Skip to content

Instantly share code, notes, and snippets.

@eskim
Created January 8, 2015 02:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eskim/0e9053b9c571619da68c to your computer and use it in GitHub Desktop.
Save eskim/0e9053b9c571619da68c to your computer and use it in GitHub Desktop.
var res = null;
for(var i = 0 ; i<2; i++){
res = new Date().getTime();
console.log('-', res);
(function(x){
setTimeout(function(){
console.log('--', x);
}, 500);
})(res);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment