4.如何用node 在cmd窗口 打开js文件
1.安装好node之后,在桌面创建hello文件夹,在创建hello.js 文件中写
hello.js
console.log("hi node.js");
var a=1;
var b=2;
console.log(a+b);
2.cmd窗口执行。

3.可看到上图执行结果为:
hi node.js 3
1.安装好node之后,在桌面创建hello文件夹,在创建hello.js 文件中写
hello.js
console.log("hi node.js");
var a=1;
var b=2;
console.log(a+b);
2.cmd窗口执行。

3.可看到上图执行结果为:
hi node.js 3