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

An array has no element at index 8. What does reading that index return?

  1. RangeError
  2. null
  3. undefinedالإجابة الصحيحة
  4. the nearest element

الشرح

Reading an array position with no element returns undefined rather than throwing. That result alone cannot prove the position is absent, because a present element could itself contain undefined.

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

بدء التدريب
السؤال 39: An array has no element at index 8. What does reading that… · JavaScript Fundamentals · Questena