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. Wher
by jl6 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.
Where can I read more about this feature of JavaScript?
- nsm 9y agoJS objects are tables, with Arrays being a syntactic convenience with some extra properties. JS engines do heavily optimize for the array case with dense layout. https://docs.microsoft.com/en-us/scripting/javascript/objects-and-arrays-javascript https://docs.microsoft.com/en-us/scripting/javascript/object... Calling it novel to JS is a stretch. Lua does this too and I’m sure there are other languages.
- fiddlerwoaroof 9y agophp does too