Subclassing an array and array methods

Rick Waldron waldron.rick at gmail.com
Sat Nov 12 12:17:53 PST 2011


snip


> Use case 2: Avoid the length pitfall:
>    var arr = new Array().init(5); // same as [5]
>

See: Array.of()
http://wiki.ecmascript.org/doku.php?id=strawman:array_extras




> snip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20111112/231fb664/attachment.html>


More information about the es-discuss mailing list