Skip to content

Instantly share code, notes, and snippets.

@bozzmob
Created December 22, 2015 04:57
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 bozzmob/26d38b83dc37d1be37f5 to your computer and use it in GitHub Desktop.
Save bozzmob/26d38b83dc37d1be37f5 to your computer and use it in GitHub Desktop.
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