Closed Bug 1269863 Opened 9 years ago Closed 9 years ago

"const" in "for of" loop declaration throws SyntaxError

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1101653

People

(Reporter: callahad, Unassigned)

Details

(Keywords: DevAdvocacy)

`let` works as expected: » for (let x of ['foo', 'bar', 'baz']) { console.log(x); } foo bar baz « undefined `const` unexpectedly throws: » for (const y of ['foo', 'bar', 'baz']) { console.log(y); } × SyntaxError: missing = in const declaration Both work identically in Chrome.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.