Is this implementation of JavaScript's Function.prototype.bind more or less correct?
Function.prototype.bindTemp = function () {
const fn = this;
var args = Array.prototype.slice.apply(arguments);
const ctx = args[0];
args = args.slice(1);
return function () {
return fn.apply(ctx, args.concat(Array.prototype.slice.apply(arguments)));
}
};
anything obviously wrong or missing?