3 ms·
> Mark utilizes a novel feature in JavaScript that an plain JS object is actually array-like, it can contain both named properties and indexed properties. woul
by LoSboccacc 9y ago
> Mark utilizes a novel feature in JavaScript that an plain JS object is actually array-like, it can contain both named properties and indexed properties.
wouldn't that make introspecting objects very annoying?
- henryluo 9y agoIn Mark implementation, care has been taken so that indexed contents are not enumerable. So e.g. when you run a for ... in loop on a Mark object, you'll only see properties, not the contents. This is one of the difference between Mark object and an array. Array contents are enumerable by default.