Квиз по JavaScript: Destructuring & Spread

Destructuring and the spread syntax show up in almost every modern JavaScript file. This quiz checks array and object destructuring, default values, renaming, rest elements and how spread copies and merges.

Лёгкий 10 вопроса ~5 минуты Проходной балл: 80% Node.js 22

Выберите режим

Вы играете как гость: войдите, чтобы сохранить XP и серию.

Пример вопроса

Вопрос 1 из 10

What does this print?

const [a, b] = [10, 20, 30];
console.log(a, b);
Показать ответ

A. 10 20 Array destructuring takes items by position, so a gets the first item and b the second. Extra items are simply ignored.

Что проверяет этот квиз

  • Array and object destructuring
  • Default values and renaming
  • Rest elements with ...
  • Merging objects and arrays with spread
  • Destructuring function parameters

Частые вопросы

Нужен ли аккаунт?

Нет. Играть может любой. Войдите, чтобы сохранять XP, серию, значки и историю.

Можно пройти ещё раз?

Да. Лучший результат сохраняется, а вопросы и ответы каждый раз перемешиваются.