1.在Node.js安装目录中新建一个文件helloworld.js,内容如下:console.log('HelloWorld');2.控制台中,进入nodejs目录, 输入指令: node hello.js控制台输出: HelloWorld