Skip to content

Instantly share code, notes, and snippets.

@leobalter
Last active July 24, 2019 20:55
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 leobalter/1903855ba80a5ae0793a5b9ba281a15f to your computer and use it in GitHub Desktop.
Save leobalter/1903855ba80a5ae0793a5b9ba281a15f to your computer and use it in GitHub Desktop.
var p = Promise.resolve(1).then(v => console.log(v);
console.log(0);
await import('foo');
console.log(2);
p.then(() => console.log(3);
await import('bar');
p.then(() => console.log(5));
console.log(4);
// 0, 1, 2, 3, 4, 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment