-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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