Skip to content

Instantly share code, notes, and snippets.

@notthetup
Last active August 29, 2015 14:04
Show Gist options
  • Save notthetup/1681bc20c1e29e1366ed to your computer and use it in GitHub Desktop.
Save notthetup/1681bc20c1e29e1366ed to your computer and use it in GitHub Desktop.
Async JS Experiments
console.log("begin act one");
[1,2,3,4,5].forEach(function(e){console.log(e)});
console.log("end act one");
console.log("begin act two");
console.log("act two scene 1");
[1,2,3,4,5].forEach(function(e){window.setTimeout(function(){console.log(e);})});
console.log("act two scene 2");
window.setTimeout(function(){console.log(6)});
console.log("end act two");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment