Function Currying Using bind()
By xyz on 2 weeks ago|0 comment||
0
Create a new function that, when called, has its this keyword set to the provided value.
function multiply(a, b) {
return a * b;
}
let double = multiply.bind(null, 2);
console.log(double(5)); // 10
Add a Comment
Comments
Comments MIA, jokes needed ASAP. Add yours! 😄