๐Ÿ”ฐ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:

๐Ÿ“˜ 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