🔰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
enumerable property.
in operator
Proxy intercepts property enumeration.
...obj adds all enumerable own properties of an object to an object literal.
obj.mergeWith() - merge with other source objects.
Last updated
Was this helpful?