Skip to content

Instantly share code, notes, and snippets.

@gskachkov
Last active July 11, 2017 20:51
Show Gist options
  • Save gskachkov/5ba8ebeb52977d773ee7e20b1570295e to your computer and use it in GitHub Desktop.
Save gskachkov/5ba8ebeb52977d773ee7e20b1570295e to your computer and use it in GitHub Desktop.
async function foo (value) {
return Promise.resolve(value + 1);
}
async function bar (value) {
return Promise.resolve(value + 2);
}
async function foobar() {
const value = await foo(1);
const result = await bar(value);
// Do what you need with result
// Save to local storage;
}
foobar();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment