For example, I understand I can do the below to bind the 1st argument
But how can I bind the 2nd argument and leave the first as is. In other words how can I bind to ‘b’ only?
Of course you can do it. Here’s an ES6 solution using the spread operator (
If you’d prefer to specify the position at which binding starts:
IN ES5, you have to muck around with constructing argument lists.
Unlike the first two examples, this one handles
In the context of your example: