Array subclasses and concat() ?

Andrea Giammarchi andrea.giammarchi at
Mon Sep 9 15:42:30 PDT 2013

In latest ES6 draft I can read this change:

   -, 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
two things:

  1. will Array#concat produce results of the same subclass too ?
  2. what are we suppose to expect from the classic
`[]` operation, an `instanceof Arguments` ?

Thanks for any clarification.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list