Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
メモ:async await に引っ張られて Promise は非同期ぽさがあるが、非同期ではない。
console.log(1);
Promise.all([new Promise((resolve, reject) => {
console.log(3);
})]).then((values) => {
console.log(values);
});
console.log(2);
// 1
// 3
// 2
@hisasann

This comment has been minimized.

Copy link
Owner Author

@hisasann hisasann commented Apr 24, 2020

もしも非同期だったら 1 2 3 と表示されるはずだ。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment