dasunpubudumal
7/8/2018 - 3:11 PM

Async Await

Async Await

async function asyncFunction(x) {
  let result = await queryThisToDB("SELECT * FROM my_table");
  return result;
}

queryThisToDB(query) {
  // some logic
}