You mean by a library.... I favorite native support over importing a library.:. 
Although that will change ones import and export are supported. The pain of 
knowing that it was in Firefox and Netscape at one point in time.

Sent from my iPhone

> On May 15, 2015, at 5:46 AM, Dmitry Soshnikov <[email protected]> 
> wrote:
> 
> In ES2015 (available today via transpilers), one can do:
> 
> arr1.push(...arr2);
> 
> Dmitry
> 
>> On Thursday, May 14, 2015, Emanuel Allen <[email protected]> wrote:
>> kudos to you sir or ma'am, It work!
>> 
>> var arr = [9,8,7,'a','b','c'], arr2 = [];
>> 
>> [].push.apply(arr2,arr);
>> 
>> arr2;// [9,8,7,'a','b','c']
>> 
>> JS4L
>> 
>>> On May 14, 2015, at 6:40 PM, Michael Haufe <[email protected]> wrote:
>>> 
>>> ...but you can do this:
>>> 
>>> [].push.apply(arr1,arr2);
>>> 
>>>> On Thu, May 14, 2015 at 9:25 AM, Emanuel Allen <[email protected]> 
>>>> wrote:
>>>> Surprise that I can't do arr1.forEeach(arr2.push);
>>>> 
>>>> Will throw an error.
>>>> 
>>>> Using bind as:
>>>> 
>>>> push = arr2.bind(push);
>>>> arr1.forEeach(push);
>>>> 
>>>> Works... And not work. Seem to push individual elements and after every 
>>>> second element, it'll push the hold array.. And after and before each 
>>>> index that hold the array there are duplicate of that element preceding 
>>>> and following:
>>>> 
>>>> [1,2,array,2,3]//not this is with shift method
>>>> [1,2,array,3,2]//note that this is with push
>>>> 
>>>> 
>>>> JS4L
>>>> _______________________________________________
>>>> es-discuss mailing list
>>>> [email protected]
>>>> https://mail.mozilla.org/listinfo/es-discuss
>>> 
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to