🔰property enumeration
enumerate through properties of an object.
for (const key in obj) { ... }
for (const value of iterable) { ... } // object is not iterable by default.
| ✅:string / symbol | 🔤:String | 🔺:Symbol
method/operator
own enum
own nonenum
inherited enum
inherited nonenum
📘 MSN
Every property in JavaScript objects can be classified by 3 factors:
enumerable / non-enumerable
own / inherited (from the prototype chain)
📘 MSN
a property will not be enumerated if
a property by that same name has already been enumerated
a non-enumerable property by that same name has already been considered
Last updated
Was this helpful?