QuestenaPráctica que te muestra qué repasar después
Pregunta 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 pairRespuesta correcta
  3. The iterator yields element values without their indexes
  4. Pair destructuring can bind an index and its value during iterationRespuesta correcta

Explicación

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.

Continúa con este test

Empezar la práctica
Pregunta 106: Which statements about iterating array.entries() with… · JavaScript Fundamentals · Questena