0
我是学习Node.js的新手。为什么console.log会给我定义?我希望它能打印出'Hello World!'代替。我错在哪里?Nodejs调用函数
谢谢!
function Greetr() {
this.greeting = 'Hello World!';
}
Greetr.prototype.greet = function() {
console.log(this.greeting);
}
Greetr.prototype.greet();
可能重复调用你
greet
功能是否有functionName调用函数之间有什么区别.prototype.methodName()和funObject.methodName()?](https://stackoverflow.com/questions/44517936/is-there-any-difference-between-calling-function-in-functionname-prototype-metho) –