In Javascript, how can I bind arguments to a function without binding the this parameter?
this
For example:
//Example function. var c = funct
var b = (cb) => obj.c(1,2,3, cb) b(function(){}) // insidde object
More general solution:
function original(a, b, c) { console.log(a, b, c) } let tied = (...args) => original(1, 2, ...args) original(1,2,3) // 1 2 3 tied(5,6,7) // 1 2 5