js:严格模式下的this指向
2018-10-22 本文已影响0人
gis杭州
function f1(){
'use strict';
console.log(this);
}
function f2(){
//'use strict';
console.log(this);
}
f1();//undefind
f2();//window

function f1(){
'use strict';
console.log(this);
}
function f2(){
//'use strict';
console.log(this);
}
f1();//undefind
f2();//window