QuestenaՎարժանք, որը ցույց է տալիս՝ ինչ կրկնել հաջորդիվ
Հարց 100

A for...of loop processes the array ["red", "blue"]. What does its loop variable receive in order?

  1. The strings 0 and 1
  2. Two key-value pair arrays
  3. The array length twice
  4. The strings red and blueՃիշտ պատասխան

Բացատրություն

For...of consumes the array's iterable values, so the variable receives red and then blue. Index strings such as 0 and 1 are associated with for...in over an array, not this value-oriented loop.

Շարունակեք այս թեստով

Սկսել վարժանքը
Հարց 100: A for...of loop processes the array ["red", "blue"]. What… · JavaScript Fundamentals · Questena