An Interest In:
Web News this Week
- April 2, 2024
- April 1, 2024
- March 31, 2024
- March 30, 2024
- March 29, 2024
- March 28, 2024
- March 27, 2024
August 14, 2017 12:23 pm GMT
Original Link: https://css-tricks.com/using-es2017-async-functions/
Using ES2017 Async Functions
ES2017 was finalized in June, and with it came wide support for my new favorite JavaScript feature: async
functions! If you've ever struggled with reasoning about asynchronous JavaScript, this is for you. If you haven't, then, well, you're probably a super-genius.
Async functions more or less let you write sequenced JavaScript code, without wrapping all your logic in callbacks, generators, or promises. Consider this:
function logger() {
let data = fetch('https://sampleapi.com/posts')
console.log(data)
}
logger()
This code doesn't do what …
Using ES2017 Async Functions is a post from CSS-Tricks
Original Link: https://css-tricks.com/using-es2017-async-functions/
Share this article:
Tweet
View Full Article