Pet.call(this, words) 这句话中的this该怎么理解?
function Pet(words){ this.words = words; this.speak = function () { console.log( this.words) } } function Dog(words){ //Pet.call(this, words); //结果: Wang Pet.apply(this, arguments); //结果: Wang } var dog = new Dog('Wang'); dog.speak();
Pet.call(this, words) 这句话中的this该怎么理解?