Why are there so many array-like objects in the DOM?
Tweet by Leon Arnott:
Explanation:
More information on array-like objects and arrays:
#TIL the reason the DOM has so many "array-like objects" that aren't functional arrays… is because in Javascript 1.0, there were no arrays.
Explanation:
- ECMAScript 1 does have arrays, but it corresponds to JavaScript 1.3.
JavaScript version numbers apply to the JavaScript engines implemented by Netscape/Mozilla. The cross-engine way of referring to the capabilities of the language are thus ECMAScript versions.
- Arrays were indeed added after JavaScript 1, as this page shows, which lists the additions for version 1.1.
More information on array-like objects and arrays:
Comments
Post a Comment