You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 17, 2018. It is now read-only.
bind is more powerful than I knew. It changes not just 'this' but also optionally prepends args. new Array(1,2,3) can also be expressed as new (Function.prototype.bind.call(Array,null,1,2,3))(), and hence also new (Function.prototype.bind.apply(Array,[null].concat([1,2,3]))) or even just new (Function.prototype.bind.apply(Array,[null,1,2,3]));.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
bind
is more powerful than I knew. It changes not just 'this' but also optionally prepends args.new Array(1,2,3)
can also be expressed asnew (Function.prototype.bind.call(Array,null,1,2,3))()
, and hence alsonew (Function.prototype.bind.apply(Array,[null].concat([1,2,3])))
or even justnew (Function.prototype.bind.apply(Array,[null,1,2,3]));
.The text was updated successfully, but these errors were encountered: