Jul 16 2010

How ECMAScript 5 still does not allow to subclass an array

How ECMAScript 5 still does not allow to subclass an array

Extending an Array in JavaScript appears to be quite the hassle. I had always wondered why the jQuery object didn’t set Array as its prototype.

MooTools solves the issue with their Elements class, which basically copies all of Array’s methods onto it, so it behaves just like one.

  • #javascript