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

Which statements about findIndex are true? Select all that apply.

  1. It returns the first qualifying indexПравильный ответ
  2. It returns undefined when nothing qualifies
  3. It returns -1 when nothing qualifiesПравильный ответ
  4. It returns every qualifying index

Объяснение

findIndex reports the index of the first element whose callback is truthy, and it reports -1 when none qualifies. Returning undefined is the no-match behavior associated with find, not findIndex.

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

Начать тренировку
Вопрос 52: Which statements about findIndex are true? Select all that… · JavaScript Fundamentals · Questena