Closed
Bug 1064650
Opened 11 years ago
Closed 11 years ago
for...let...in and for...let...of loops only work in console
Categories
(Firefox :: Untriaged, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: obrufau, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:35.0) Gecko/20100101 Firefox/35.0
Build ID: 20140906030204
Steps to reproduce:
Run one of these loops in a webpage:
> for(let num of [1,2,3]){ console.log(num); }
> for(let num in [1,2,3]){ console.log(num); }
Actual results:
Both produce
> SyntaxError: missing ; after for-loop initializer
Expected results:
They should work, like they do in console.
Comment 1•11 years ago
|
||
You need to declare the right JS version on your script tag.
http://jsbin.com/zereq/1/edit
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•