Skip to content

Instantly share code, notes, and snippets.

@wbarcovsky
Last active January 27, 2023 09:25
Show Gist options
  • Select an option

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

Select an option

Save wbarcovsky/b8de3ac99e2fbf16c65ea8cbee5060c7 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();
});
p.then(function() {
console.log('resolve promise');
});
console.log('end script');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment