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

RESOLVED DUPLICATE of bug 449811

Status

()

RESOLVED DUPLICATE of bug 449811
2 years ago
2 years ago

People

(Reporter: github, Unassigned)

Tracking

46 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

2 years ago
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

Updated

2 years ago
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 449811
You need to log in before you can comment on or make changes to this bug.