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

What does [1, [2, [3]]].flat() return with the default depth?

  1. [1, [2, [3]]]
  2. [1, 2, [3]]Правильный ответ
  3. [1, 2, 3]
  4. [1, [2], [3]]

Объяснение

The default flat depth removes one nesting level, so 2 joins the outer array while the array containing 3 remains nested. Producing a completely flat result would require flattening more deeply than the default.

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

Начать тренировку
Вопрос 60: What does [1, [2, [3]]].flat() return with the default… · JavaScript Fundamentals · Questena