Single Choice Easy

QWhat happens if the body of a for/in loop deletes an unenumerated property?

ID: #5068 Javascript loops MCQ 160 views
Question Info
#5068Q ID
EasyDifficulty
Javascript loops MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A The property will be stored in a cache
  • B The loop will not run
  • C That property will not be enumerated
  • D The property will be enumerated
Correct Answer

Explanation

If a property on an object is deleted during a for/in loop before it is enumerated, it will not be enumerated.
Additionally, properties that are defined within the body of the loop will typically not be included in the enumeration.

Share This Question

Challenge a friend or share with your study group.