Function.prototype.bind1 = function () {
const args = Array.prototype.slice.call(arguments);
const t = args.shift();
const self = this;
return function () {
return self.apply(t, args);
}
}
Function.prototype.apply1 = function (context, args) {
if(context == null) {
context = window;
}
const self = this;
const res = self(...args);
return res;
}
Function.prototype.call1 = function() {
const args = [...arguments];
const t = args.shift();
const self = this;
const res = self(args);
return res;
}
console