最近我安装了node.js在我的Windows 7机器上.
在执行JavaScript时,我会收到一条undefined的消息,并成功执行表达式.
这里怎么了?我没有注意到任何其他副作用.
最近我安装了node.js在我的Windows 7机器上.
在执行JavaScript时,我会收到一条undefined的消息,并成功执行表达式.
这里怎么了?我没有注意到任何其他副作用.
写"hello world";
然后按回车键...它将返回"hello world"
而不是undefined
,因此不显示undefined
.console.log
返回undefined
,并将参数记录到控制台,以便获得多条消息.