标签:read define fine cti property efi anon err fun
function sai(){
console.log(this.x)
}
var a = {
x: 1
}
var b = {
x: 2
}
sai.call(a)//1
sai.call(b)//2
sai.call(a).call(b)//1 Uncaught TypeError: Cannot read property 'call' of undefined at <anonymous>
sai.apply(b).apply(a)//2 Uncaught TypeError: Cannot read property 'apply' of undefined at <anonymous>
sai.bind(a).call(b)// 1
标签:read define fine cti property efi anon err fun
原文地址:https://www.cnblogs.com/yzyh/p/10037551.html