Closed Bug 1163539 Opened 10 years ago Closed 10 years ago

Let Binding in For Loop with setTimeout

Categories

(Core :: JavaScript Engine, defect)

37 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 854037

People

(Reporter: jacobparker1992, Unassigned)

Details

(Whiteboard: DUPEME)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0 Build ID: 20150403141925 Steps to reproduce: for (let i=1; i<=5; i++) { setTimeout(function(){ console.log("i:", i); }, 0); } Actual results: 5 5 5 5 5 Expected results: 1 2 3 4 5
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Whiteboard: DUPEME
Already fixed in Firefox 39, Aurora/Dev Edition currently.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.