Spare a thought for JavaScript’s arguments
object. It wants so desperately to be an array. It walks like an array, quacks like an array but flies like a turkey. During the early years of the language Brendan Eich came close to rewriting arguments
as an array until ECMA came along and clipped its wings forever.
In spite of all this (or maybe because of it) we love the arguments
object. In this article I’ll explore its niftyness and its quirkiness and I’ll finish up by looking at the likely successors: rest
and spread
…
Continue reading “The JavaScript arguments object…and beyond”