Is let let = 1 a valid statement?
My bad, I mixd it with esprima, on Chrome and Firefox in loose mode, let declaration is not support. so it's syntax error, in esprima, let let = 1 is invalid, but let private = 1 is valid.
"Eric Suen" news:CADSmRNY42euUWs4akZW4_2QSBnG+m_T+Ke-y8Mh1tAUaG9z-ww at mail.gmail.com...
In both Chrome and Firefox,
let FutureReservedWord = expr is invalid, but const | var FutureReservedWord = expr is valid, is this defined in ES 6 or historical reason?
let/const both are LexicalDeclaration, why behave differently?
On Fri, Nov 13, 2015 at 8:18 AM, Eric Suen <eric.suen.tech at gmail.com> wrote:
My bad, I mixd it with esprima, on Chrome and Firefox in loose mode, let declaration is not support. so it's syntax error, in esprima, let let = 1 is invalid, but let private = 1 is valid.
When testing things like this, I would recommend testing against the latest development versions of browsers, i.e. Chrome Canary and Firefox Nightly. At least in the latter, let is supported in strict and non-strict mode.
Also, take a look at es6draft, which strives (very successfully) to be a highly compliant implementation of the entire spec: anba/es6draft
Thanks, maybe should add es6draft to addyosmani/es6-tools
I don't even know this exists, and wiki is down too...
In both Chrome and Firefox,
let FutureReservedWord = expr is invalid, but const | var FutureReservedWord = expr is valid, is this defined in ES 6 or historical reason?
let/const both are LexicalDeclaration, why behave differently?