Can node Environment Run es6 Code Directly

  node.js, question

My version of node is 4.2.2. When learning es6, write a script. Can I only use babel to convert it to es5 and then execute it? Can node run es6 code directly? I searched and saidnode --harmony index.js, seems to have no effect


To add, my index.js code is as follows. this codenode --harmony index.jsIt was a mistake

let a = 100;
 console.log(a);

If we change let to const, we can run it. does this version of node not support let yet?

Adduse strict
No need to add--harmony
However, it is necessary to know which es6 features are supported. Not all es6 features are supported.

https://nodejs.org/en/docs/es6/

'use strict';
 
 let a = 100;
 console.log(a);