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