Goodbye var: ES6 variable declarations with let and const(strongloop.com)
strongloop.com
Goodbye var: ES6 variable declarations with let and const
https://strongloop.com/strongblog/es6-variable-declarations/
2 comments
It's too bad it'll be a long while before these can be used in node modules without a transpiler :-(
Or just require devs to use --harmony. I think there are a couple modules that do so... like koa. :)
Of course, since that's basically "experimental" I guess people would think your module is also "experimental". But I think let and const are pretty darn stable.
Of course, since that's basically "experimental" I guess people would think your module is also "experimental". But I think let and const are pretty darn stable.
Maybe when io.js and node.js merge :)
Available in the latest version of Node or only io.js?
It's in Node.js v0.12.0, but only with the --harmony flag (and I think you also have to specify --use-strict).
Also note that even in io.js you need to enable "strict mode;" in all scripts!