Closed
Bug 1279735
Opened 9 years ago
Closed 9 years ago
Allow const declaration in for-in loop
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 449811
People
(Reporter: balloonguy123, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:49.0) Gecko/20100101 Firefox/49.0
Build ID: 20160611004009
Steps to reproduce:
Run the following script:
let a={};
for(const x in a){}
Actual results:
SyntaxError: missing = in const declaration
Expected results:
Declaring x as const should not have raised a syntax error. http://www.ecma-international.org/ecma-262/6.0/#sec-iteration-statements suggests that a const declaration is valid, and the syntax does not raise an error in Chrome 51.0.2704.84
Updated•9 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•