Closed Bug 1273865 Opened 8 years ago Closed 8 years ago

syntax error when using for (const <var> of <var>) {

Categories

(Core :: JavaScript Engine, defect)

46 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 449811

People

(Reporter: github, Unassigned)

References

()

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0
Build ID: 20160508065511

Steps to reproduce:

I tests a script found on MDN:

let iterable = [10, 20, 30];

for (const value of iterable) {
  console.log(value);
}


Actual results:

console logged the following error:

SyntaxError: missing = in const declaration


Expected results:

console should log:

10
20
30
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.