Skip to content

Instantly share code, notes, and snippets.

@bozzmob
Created December 22, 2015 04:57
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