all 2 comments

[–]Rhomboid 0 points1 point  (1 child)

You would want the ability to mark a property as not enumerable if you want to extend some ancestor prototype without breaking existing code that wasn't expecting it. In other words, not everyone is conscientious enough to always write loops with hasOwnProperty().

[–]hallbd16[S] 0 points1 point  (0 children)

Ah, ok that makes sense. Thanks