Skip to content

Instantly share code, notes, and snippets.

@BenjaminLu
Created June 9, 2017 13:18
Show Gist options
  • Save BenjaminLu/9706c1b42c8bc6402abbc97011e5cda9 to your computer and use it in GitHub Desktop.
Save BenjaminLu/9706c1b42c8bc6402abbc97011e5cda9 to your computer and use it in GitHub Desktop.
for (var i = 0; i < 5; i++) {
setTimeout(function () {
console.log("i = " + i);
}, 1000);
}
console.log(i);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment