Can't do push in forEach
emanuelallen at hotmail.com
Fri May 15 00:07:55 UTC 2015
kudos to you sir or ma'am, It work!
var arr = [9,8,7,'a','b','c'], arr2 = ;
> On May 14, 2015, at 6:40 PM, Michael Haufe <tno at thenewobjective.com> wrote:
> ...but you can do this:
>> On Thu, May 14, 2015 at 9:25 AM, Emanuel Allen <emanuelallen at hotmail.com> wrote:
>> Surprise that I can't do arr1.forEeach(arr2.push);
>> Will throw an error.
>> Using bind as:
>> push = arr2.bind(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
>> es-discuss mailing list
>> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss