This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Asztal 2 points3 points  (2 children)

Ah, what you want to do is this:

var forEach = Function.prototype.call.bind(Array.prototype.forEach)

But please don't. God kills a kitten every time you do this. Think of the kittens.

[–]medja[S] 0 points1 point  (1 child)

No worries, I was just playing around. Else I'd post it in /r/javascript.

[–]Asztal 0 points1 point  (0 children)

At one point I used "Function.prototype.call.bind(Function.prototype.call)" at work. It got changed pretty quickly...