// //call
// function stdunt(n1, n2) {
// console.log(this.name) //this=>objs
// console.log(this.name + n1 + n2) //this=>8
// }
// let objs = {
// name: 3
// }
// stdunt.call(objs, 2, 3)
// //applay
// function hello(name, age) {
// console.log(this)
// console.log(name);
// console.log(name + this.name);
// console.log(arguments)
// }
// let util = {
// name: 234
// }
// hello.apply(util, ["tsrot", 24, 12, 45, 6]);
//bind
var person = {
name: "tsrot",
age: 24,
sayHello: function (age) {
console.log(this.name);
console.log(age);
}
};
var son = {
name: "xieliqun"
};
var boundFunc = person.sayHello.bind(son);
boundFunc(25)
// call 可传值 apply 传数组 bind 返回新的函数
console