Mad*_*d0g 10 node.js ecmascript-harmony nvm
我已经有节点0.10.*并且我安装了nvm,然后通过nvm我再次安装了0.11.13和0.10.
node --version返回0.11.13
我尝试使用我读过的一些ES6功能,而我尝试过的任何功能都没有.
我用我的脚本运行 node --harmony index.js
...args 说 SyntaxError: Unexpected token .
let x = 5; 也给出了错误 - SyntaxError: Unexpected identifier
我在哪里可以找到0.11.13目前支持的内容?
试试这个
"use strict"
let x = 5;
console.log(x)
Run Code Online (Sandbox Code Playgroud)
它会工作.
像下面这样运行它
node --harmony file.js
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7639 次 |
| 最近记录: |