Skip to content

Instantly share code, notes, and snippets.

@ylv-io
Created February 7, 2019 19:50
Show Gist options
  • Save ylv-io/284ed313c1df60968a3aa903f8c7c622 to your computer and use it in GitHub Desktop.
Save ylv-io/284ed313c1df60968a3aa903f8c7c622 to your computer and use it in GitHub Desktop.
for (var i = 0; i < 5; i++) {
setTimeout(function() { console.log(i); }, i * 1000 );
}
for (let i = 0; i < 5; i++) {
setTimeout(function() { console.log(i); }, i * 1000 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment