QuestenaՎարժանք, որը ցույց է տալիս՝ ինչ կրկնել հաջորդիվ
Հարց 109

The variable target is undefined. What error type results from evaluating target.name directly?

  1. TypeErrorՃիշտ պատասխան
  2. ReferenceError
  3. SyntaxError
  4. No error; the result is undefined

Բացատրություն

Direct property access requires a usable base value, and undefined cannot serve as that base, so the operation throws a TypeError. A missing property on an existing ordinary object would merely produce undefined, which is a different situation.

Շարունակեք այս թեստով

Սկսել վարժանքը
Հարց 109: The variable target is undefined. What error type results… · JavaScript Fundamentals · Questena