3 ms·
Goodbye var: ES6 variable declarations with let and const
- sickeythecat 12y agoAvailable in the latest version of Node or only io.js?
- jakerella86 12y agoIt's in Node.js v0.12.0, but only with the --harmony flag (and I think you also have to specify --use-strict).
- jakerella86 12y agoAlso note that even in io.js you need to enable "strict mode;" in all scripts!
- rmgraham 12y agoIt's too bad it'll be a long while before these can be used in node modules without a transpiler :-(
- shubhra51 12y agoMaybe when io.js and node.js merge :)
- jakerella86 12y agoOr 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.