Created
April 3, 2018 12:32
-
-
Save indongyoo/1110c6c0132f161ed0d647aedef1d851 to your computer and use it in GitHub Desktop.
This file contains 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
go([0, 0, 3000, 5000, 6000, 1000, 5000], | |
someC(a => new Promise(function (resolve) { | |
setTimeout(function() { resolve(a); }, a); | |
})), | |
b => console.log(b, '<----------- 1초 뒤')); | |
// true <----------- 1초 뒤 | |
// - 모든 값에 해당하는 함수 평가 | |
// - 1000이 가장 먼저 결과를 만들어서 1초 뒤 결과를 즉시 리턴하고, 나머지는 기다리지 않음 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment