var zlw = {
name: "zlw",
sayHello: function (age) {
console.log("hello, i am ", this.name + " " + age " years old");
}
};
var xlj = {
name: "xlj",
};
zlw.sayHello(24);// hello, i am zlw 24 years old
zlw.sayHello.call(xlj, 24);// hello, i am xlj 24 years old
zlw.sayHello.apply(xlj, [24]);// hello, i am xlj 24 years old
zlw.sayHello.bind(xlj, 24)(); //hello, i am xlj 24 years old
zlw.sayHello.bind(xlj, [24])(); //hello, i am xlj 24 years old