Last active
August 29, 2015 14:17
-
-
Save ludekstepan/02a064255a0d4f220c60 to your computer and use it in GitHub Desktop.
Let in for loop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
for (let i = 0; i < 10; i++) { | |
console.log('iterating ', i); | |
i = 10; | |
setTimeout(() => console.log('timeout', i), 100); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node --version | |
v0.12.0 | |
node --harmony for-let.js | |
iterating 0 | |
timeout 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment