🔰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/operatorown enumown nonenuminherited enuminherited nonenum
🔤
🔤
🔤
🔺
🔺

for-in (loop over keys)

🔤
🔤

for-of (loop over values)

🔤
🔤

📘 MSN

Every property in JavaScript objects can be classified by 3 factors:

📘 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