Skip to content

Instantly share code, notes, and snippets.

@wbarcovsky
Last active August 24, 2022 09:40
Show Gist options
  • Select an option

  • Save wbarcovsky/d848e6e3cee57455f045f222b00e1441 to your computer and use it in GitHub Desktop.

Select an option

Save wbarcovsky/d848e6e3cee57455f045f222b00e1441 to your computer and use it in GitHub Desktop.
setTimeout(function timeout() {
console.log('timeout');
}, 0);
let p = new Promise(function(resolve, reject) {
console.log('create promise');
resolve();
});
console.log('end script');
p.then(function() {
console.log('resolve promise');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment