Black lives matter
Portrait Dr. Axel Rauschmayer
Dr. Axel Rauschmayer
Homepage | Twitter
Cover of book “JavaScript for impatient programmers”
Book, exercises, quizzes
(free to read online)
Cover of book “Deep JavaScript”
Book (50% free online)
Cover of book “Tackling TypeScript”
Book (first part free online)
Logo of newsletter “ news”
Newsletter (free)

Why are there so many array-like objects in the DOM?

(Ad, please don’t block)

Tweet by Leon Arnott:

#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.
  • 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: