I perfectly know the usages for :
Function.prototype.bind.apply(f,arguments)
Explanation - Use the original (if exists)
bind
method overf
witharguments
(which its first item will be used as context tothis
)
This code can be used ( for example) for creating new functions via constructor function with arguments
Example :
function newCall(Cls) {
return new (Function.prototype.bind.apply(Cls, arguments));
}
Execution:
var s = newCall(Something, a, b, c);
But I came across this one : Function.prototype.apply.bind(f,arguments)
//word swap
Question :
As it is hard to understand its meaning - in what usages/scenario would I use this code ?