Finally es6 classes have landed in Node.js v4.0.0. But the feature needs --use_strict
option to be passed. e.g.
node --use_strict sampleClass.js
What does this --use_strict
option signify? Has it anything to do with "use strict"; javascript directive.
Note: On Linux Classes worked in v0.12 too but not in Windows
Edit: If you want to omit --use_strict
flag than use "use strict";
in js file