Skip to content

Instantly share code, notes, and snippets.

@kunigami
Last active July 1, 2019 02:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kunigami/8acaeaac75671e643f1f34e18065af38 to your computer and use it in GitHub Desktop.
Save kunigami/8acaeaac75671e643f1f34e18065af38 to your computer and use it in GitHub Desktop.
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