Код: Выделить всё
// ArrayAssignmentPattern
const [firts, second] = await Promise.all([
fetch('https://api.example.com/first'),
fetch('https://api.example.com/second')
])
< /code>
и < /p>
// ObjectAssignmentPattern
const { 0: third, 1: fourth } = await Promise.all([
fetch('https://api.example.com/first'),
fetch('https://api.example.com/second')
])
Подробнее здесь: https://stackoverflow.com/questions/797 ... mentpatter
Мобильная версия