Does node.js support a let statement something like what's described on MDN??
var x = 8,
y = 12;
let ( x = 5, y = 10) {
return x + y;
} //15
If not, is there a way to duplicate the functionality with a self-executing anonymous function or something?
And/or is there another js environment that
- has
let
and and
- has a REPL, as node does? Rhino?
EDIT:
This question was asked quite a while ago. As of now, late 2015, the answer is "Yes, yes it does". Harmony features were included by default in io.js 3.3, and have been recently brought back to node.js with the 4.x release.
question from:
https://stackoverflow.com/questions/11283538/does-node-js-support-the-let-statement 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…