Skip to content

Instantly share code, notes, and snippets.

@ludekstepan
Last active August 29, 2015 14:17
Show Gist options
  • Save ludekstepan/02a064255a0d4f220c60 to your computer and use it in GitHub Desktop.
Save ludekstepan/02a064255a0d4f220c60 to your computer and use it in GitHub Desktop.
Let in for loop
"use strict";
for (let i = 0; i < 10; i++) {
console.log('iterating ', i);
i = 10;
setTimeout(() => console.log('timeout', i), 100);
}
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