Last active
October 30, 2020 12:20
-
-
Save victorb/9579427d3f30525d725739ee2fca5b33 to your computer and use it in GitHub Desktop.
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
function resolveLater() { | |
return new Promise(resolve => { | |
setTimeout(() => { | |
resolve('finish'); | |
}, 2000); | |
}); | |
} | |
async function asyncCall() { | |
console.log('let'); | |
var result = await resolveLater(); | |
console.log(result); | |
// expected output: "finish" | |
} | |
console.log("I'ma") | |
asyncCall(); | |
console.log("you") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment