Please refer to http://www.cnblogs.com/xljzlw/p/3775162.html
Call apply
var MTT = { name: "MTT", sayhello:function (age) { console.log ("Hello, I Am", this.name + "+ Age" years Old ");} ; var xjs = { name: "XJS",
};mtt.sayhello (24); Hello, I am zlw years old
The Apply parameter needs to be in the form of an array, and the call parameter needs to be separated by commas 24,25
MTT Sayhello.call (XJS, 24); Hello, I am xjs years old
MTT sayhello.apply (XJS, [24]); Hello, I am xjs years old
The arguments that the bind method passes to the calling function can be listed individually or in an array. The most significant difference between the bind method and call, apply is the function that returns a binding context
//hello, I am xlj years old //hello, I am xlj years old
Bind
var bind = Function.prototype.call.bind (Function.prototype.bind), var zlw = {name: "ZLW"};function Hello () { // Hello, I am ZLW
JS to call Apply bind understanding