this指向、call、applay、bind区别与联系
1-说说你对 this 的理解
this以函数形式调用时指向window
this以对象形式进行调用时指向对象
this以构造函数进行调用时指向新创建的对象
2-call\apply\bind 的区别和联系?
applay(this指向,[参数])
call(this指向,参数)
bind(this指向,参数可写可不写)
3-下面代码执行的结果是什么?
hello one hello four hello three hello two
4-下面代码执行的结果是什么?
{
id:10
}

浙公网安备 33010602011771号