Home / CSE / Javascript - CS :: Discussion

Discussion :: Javascript - CS

  1. What will happen if the body of a for/in loop deletes a property that has not yet been enumerated?

  2. A.

     The property will be stored in a cache

    B.

     The loop will not run

    C.

     That property will not be enumerated

    D.

     All of the mentioned

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    If the body of a for/in loop deletes a property that has not yet been enumerated, that property will not be enumerated. If the body of the loop defines new properties on the object, those properties will generally not be enumerated.


Be The First To Comment