Single Choice Easy

QWhat happens if the for/in loop body deletes a property that has not yet been enumerated?

ID: #5065 Javascript loops MCQ 219 views
Question Info
#5065Q 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 the body of a for/in loop removes a property that has not yet been enumerated, that property will not be included in the loop.
Additionally, if the body of the loop adds new properties to the object, those properties will typically not be enumerated.

Share This Question

Challenge a friend or share with your study group.