???????????????????????
???用文本编辑器。如npp,键入例如以下代码。存储成hello.js
console.log(‘hello‘)console.log(‘hello %s->%d‘,‘jeapedu‘, 1941847311)
console.log(‘hello‘)console.log(‘hello %s->%d‘,‘jeapedu‘, 1941847311)node hello.jsC:\nodeS>node hello.jshellohello jeapedu->1941847311
cmd进入dos。切入hello.js所在文件夹,执行node.js程序
node hello.js
执行结果例如以下所看到的:
C:\nodeS>node hello.jshellohello jeapedu->1941847311
Node.js的helloworld 程序
原文地址:https://www.cnblogs.com/llguanli/p/8412564.html