Skip to content

Instantly share code, notes, and snippets.

@gil00pita
Forked from gisderdube/async.js
Last active February 8, 2019 23:12
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 gil00pita/a7f5f90834e97ea37c2ca8eded745c60 to your computer and use it in GitHub Desktop.
Save gil00pita/a7f5f90834e97ea37c2ca8eded745c60 to your computer and use it in GitHub Desktop.
https://levelup.gitconnected.com/9-tricks-for-kickass-javascript-developers-in-2019-eb01dd3def2a If you’re still stuck in callback hell, 2014 wants its code back. Just don’t use callbacks, unless it is absolutely necessary, for example required by a
async function getData() {
const result = await axios.get('https://dube.io/service/ping')
const data = result.data
console.log('data', data)
return data
}
getData()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment