QuestenaUn entraînement qui indique quoi revoir ensuite
Question 52

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

  1. It returns the first qualifying indexBonne réponse
  2. It returns undefined when nothing qualifies
  3. It returns -1 when nothing qualifiesBonne réponse
  4. It returns every qualifying index

Explication

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.

Continuer avec ce test

Commencer l’entraînement
Question 52: Which statements about findIndex are true? Select all that… · JavaScript Fundamentals · Questena