You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Agree that the REPL shouldn't hang. It should provide a SyntaxError.
Exponentiation operator is (or will certainly be if it isn't officially yet) part of the ES 2016 spec. Node.js will get it some time after v8 implements it. Until then, you'll have to use Math.pow() (or a transpiler) instead:
$ node
> let a = Math.pow(10, 9);
undefined
> a
1000000000
>
Activity
Fishrock123 commentedon Jun 17, 2016
IIRC the exponentiation operator is not even part of the official spec yet, nothing we can do here...
V8 (the JS engine we use) would also need to implement it first. If it's specced, maybe within 6 months.
cjihrig commentedon Jun 17, 2016
It would be nice if the REPL didn't just hang.
By the way @archcorsair, in the future, an inline piece of code would be preferable as an example.
Trott commentedon Jun 22, 2016
Agree that the REPL shouldn't hang. It should provide a
SyntaxError.Exponentiation operator is (or will certainly be if it isn't officially yet) part of the ES 2016 spec. Node.js will get it some time after v8 implements it. Until then, you'll have to use
Math.pow()(or a transpiler) instead: