关于this指向问题.

function identify() {

    return this.name.toUpperCase();

}


function sayHello() {

    var greeting = "Hello, I'm " + identify.call( this );//不太理解这一步是把this绑定到sayHello函数中嘛?

    console.log( greeting );

}


慕妹3146593
浏览 359回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript