Can't do push in forEach
Emanuel Allen
emanuelallen at hotmail.com
Thu May 14 15:15:31 UTC 2015
Meant the method of the array not the array m itself: array["push"&&"unshift"].bind(array);
Sent from my iPhone
> On May 14, 2015, at 10:42 AM, Garrett Smith <dhtmlkitchen at gmail.com> wrote:
>
>> On 5/14/15, Emanuel Allen <emanuelallen at hotmail.com> wrote:
>> Surprise that I can't do arr1.forEeach(arr2.push);
>
> Check that line more carefully.
>
>
>> Will throw an error.
>>
>> Using bind as:
>>
>> push = arr2.bind(push);
>
> Arrays don't have a bind method.
> --
> Garrett
> @xkit
> ChordCycles.com
> garretts.github.io
> personx.tumblr.com
More information about the es-discuss
mailing list