Explain bindbind() function

OK. We have three times the Function.prototype.bind function here, whose (simplified) code function bind(context) { var fn = this; return function() { return fn.apply(context, arguments); } } I will abbreviate in a more functional style with lots of partial application: bindfn(context) -> fncontext. So what does it do? You have got bind.call(bind, bind) or bindbind(bind). … Read more

What are the differences (if any) between ES6 arrow functions and functions bound with Function.prototype.bind?

There are no (significant) differences. Well, okay, that’s a little premature. There are three tiny differences unique to arrow functions. Arrow functions cannot be used with new. This means, of course, that they do not have a prototype property and cannot be used to create an object with the classically-inspired syntax. new (() => {}) … Read more