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
The runtime need to has the visitor for the let and const statements.
For this implementation please check this link related to current supported specification.
Examples of errors
const pi=3.14
const pi=3.14
SyntaxError: redeclaration of const pi
const pi=3.14
pi=3.14
TypeError: invalid assignment to const `pi'
if(true) {let a = 2} a;
ReferenceError: a is not defined
let a=1; if(true) {console.log(a); let a=2}
ReferenceError: can't access lexical declaration `a' before initialization
The text was updated successfully, but these errors were encountered:
pemattio
changed the title
ECMA 6: implement Let and Const Declarations
ECMA 6 - Implement Let and Const Declarations
Jun 4, 2018
The runtime need to has the visitor for the let and const statements.
For this implementation please check this link related to current supported specification.
Examples of errors
SyntaxError: redeclaration of const pi
TypeError: invalid assignment to const `pi'
ReferenceError: a is not defined
ReferenceError: can't access lexical declaration `a' before initialization
The text was updated successfully, but these errors were encountered: