call apply bind?改版this指向
//var name ='jary';
//var a ={
? ? ?name:'Tom',
say:function(){
console.log(this,name);
}
}
var f =a,say;
var obj={
name:'zhangsan',
say:function(str,str2){
conslole.log(this.name+ ' '+str+' ' +str2)
??//?obj.say.call({name:'寧寧'});
????obj.say.call({name:'寧寧'},'hello','world');
????obj.say.apply({name:'寧寧'},'hello','world');
????var?f?=?obj.bind({name:'寧寧'})