-
-
Save ivan-hilckov/5fa19f39fab7672f6b7e5a12fd1b180c to your computer and use it in GitHub Desktop.
promise question
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
//Что выведет код ниже? | |
let promise = new Promise(function(resolve, reject) { | |
resolve(1); | |
setTimeout(() => resolve(2), 1000); | |
}); | |
promise.then(alert); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment