Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Async Await example
async function myAsyncFunction (myObj) {
var x = new MyDataStore(myObj);
return await x.init();
}
var returnVal = await myAsyncFunction(obj);
// in another module
async function init(){
return 10;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.