Array subclasses and concat() ?
andrea.giammarchi at gmail.com
Mon Sep 9 15:42:30 PDT 2013
In latest ES6 draft I can read this change:
- Array.prototype.map, filter, slice, splice when used iwth array
subclasses creates results arrays of the same subclass
which is good/cool/eventually/hoooray **but** something that has been
problematic since ever in subclassing Array in JS is Array#concat, together
with Array#slice and all others that returns an Array from a _array-like_
I see that slice and splice are in but reading current draft I wonder these
1. will Array#concat produce results of the same subclass too ?
2. what are we suppose to expect from the classic
`.slice.call(arguments)` operation, an `instanceof Arguments` ?
Thanks for any clarification.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss