forEach as this

29 views
Skip to first unread message

johnj...@chromium.org

unread,
Apr 3, 2014, 2:10:49 PM4/3/14
to polym...@googlegroups.com
In the polymer source I read some places:

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

Why is the function is bound to itself?

jjb

johnj...@chromium.org

unread,
Apr 3, 2014, 2:15:57 PM4/3/14
to polym...@googlegroups.com
Oh, sorry, it's 'call' that is bound, not forEach ;-)
Reply all
Reply to author
Forward
0 new messages