I want to learn how to enable harmony v8 options in Node, and my node version is:
$ node -v
v5.5.0
Use ES6 destructuring as an example for testing
$ cat destructure.js
'use strict'
var a, b
[a, b] = [1, 2]
console.log(a, b)
Run it straight gets error as expected.
$ node destructure.js
/usr/home/mko_io/pure-js-files/destructure.js:3
[a, b] = [1, 2]
^^^^^^
But get the same error, after the flag has been set:
$ node --harmony_destructuring destructure.js
/usr/home/mko_io/pure-js-files/destructure.js:3
[a, b] = [1, 2]
^^^^^^
ReferenceError: Invalid left-hand side in assignment
Where did I do it wrong?