QuestenaПрактика, после которой понятно, что повторить
Вопрос 106

Which statements about iterating array.entries() with for...of are true? Select all that apply.

  1. array.entries() immediately returns one array containing every pair
  2. Each yielded item is a two-element index-and-value pairПравильный ответ
  3. The iterator yields element values without their indexes
  4. Pair destructuring can bind an index and its value during iterationПравильный ответ

Объяснение

The entries iterator yields one two-element array at a time, containing an index and its associated value. Destructuring can bind those two parts during for...of; the method does not itself materialize one large array of every pair.

Продолжить работу с тестом

Начать тренировку
Вопрос 106: Which statements about iterating array.entries() with… · JavaScript Fundamentals · Questena