Skip to content

Instantly share code, notes, and snippets.

@malavsoni
Created May 3, 2020 15:37
Show Gist options
  • Save malavsoni/12d76477bddae85708055c3b6dcf373d to your computer and use it in GitHub Desktop.
Save malavsoni/12d76477bddae85708055c3b6dcf373d to your computer and use it in GitHub Desktop.
async function produceData() {
try {
const result1 = await processResult(); // ProcessResult function returns promise
const result2 = await processResult(result1);
const result3 = await processResult(result2);
return result3;
} catch (error) {
return error;
}
}
// Produce and Return Data
const result = produceData()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment