Function.prototype.muCall = function(context,... args){//call context = Object(context) || window let key = Symbol('own') context[key] = this args = args || [] let res =  context[key](... args) delete context[key] return res } Function.prototype.muapply = function(context,args) {//apply / / default is not on the window is here, you can also use es6 give parameters to set the default context = Object (context) | | window args = args? args : Const key = Symbol() context[key] = this // Call the function const result = by implicitly binding context[key](... The args) / / delete the add attribute the delete the context [key] / / return value from a Function call returns the return result} Function. The prototype. Mubind = Function (context,... args) {//bind const fn = this args = args || [] return function newFn(... newFnArgs) { if(this instanceof newFn) { return new fn(... args,... newFnArgs) } return fn.apply(context,[...args,...newFnArgs]) } } function sayHelloTo (to,fo) { console.log(`${this.name}  say hello to ${to}-${fo}`) } var Foo = { name: 'Foo' } sayHelloTo.muCall(Foo,'a','b') // let ca = sayHelloTo.mubind(Foo) // ca('a','b') //Foo say hello to Bar.Copy the code