Last active
July 1, 2019 02:49
-
-
Save kunigami/8acaeaac75671e643f1f34e18065af38 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
function f1() { | |
return Promise.resolve(21); | |
} | |
function f2(x) { | |
return Promise.resolve(x * 2); | |
} | |
async function g() { | |
r = await f1(); | |
return await f2(r); | |
} | |
g().then(x => console.log(x)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment