Skip to content

Instantly share code, notes, and snippets.

@kunigami
Created July 1, 2019 01:43
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/dfe27b88af7cdc718ffa79e2da9d4918 to your computer and use it in GitHub Desktop.
Save kunigami/dfe27b88af7cdc718ffa79e2da9d4918 to your computer and use it in GitHub Desktop.
function f() {
return Promise.resolve(10);
}
// Implicitly returns a Promise
async function g() {
r = await f();
return r + 1;
}
g().then(r => console.log(r));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment