Created
April 24, 2020 06:15
-
-
Save hisasann/849845f472f3fbc4463a3dbaf79719ce to your computer and use it in GitHub Desktop.
メモ:async await に引っ張られて Promise は非同期ぽさがあるが、非同期ではない。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log(1); | |
Promise.all([new Promise((resolve, reject) => { | |
console.log(3); | |
})]).then((values) => { | |
console.log(values); | |
}); | |
console.log(2); | |
// 1 | |
// 3 | |
// 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
もしも非同期だったら 1 2 3 と表示されるはずだ。