Function.prototype.my_bind = function () {
var self = this,
context = Array.prototype.shift.call(arguments),
args = Array.prototype.push.call(arguments);
return function () {
self.apply(context, Array.prototype.concat.call(args, Array.prototype.slice.call(arguments)));
}
}
function a(m, n, o) {
console.log(this.name + ' ' + m + ' ' + n + ' ' + o);
}
var b = {
name: 'kong'
};
let ac = a.my_bind(b, 7, 8);
ac(9)
function abc(){
args = Array.prototype.slice.call(arguments);
console.log(args)
}
abc(1,23,4,5,61,1,31,2,31,31,23)
console