Questenaتدريب يوضح لك ما ينبغي مراجعته لاحقًا
السؤال 51

What does find return when no array element makes its callback truthy?

  1. -1
  2. an empty array
  3. undefinedالإجابة الصحيحة
  4. false

الشرح

find returns undefined when no element qualifies, rather than returning a sentinel index. A qualifying element may itself contain undefined, so the return value alone cannot distinguish those situations.

تابع هذا الاختبار

بدء التدريب
السؤال 51: What does find return when no array element makes its… · JavaScript Fundamentals · Questena