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

A program evaluates the identifier total, but no accessible lexical environment contains that name. Which error type results?

  1. TypeError
  2. ReferenceErrorالإجابة الصحيحة
  3. SyntaxError
  4. No error; unresolved names evaluate to undefined

الشرح

Normal identifier resolution searches the accessible lexical environments, and failure to resolve the name causes an error of the ReferenceError type. This is not a TypeError because no value was obtained for an operation; the lookup itself failed.

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

بدء التدريب
السؤال 114: A program evaluates the identifier total, but no accessible… · JavaScript Fundamentals · Questena