filmov
tv
javascript - Syntax for an async arrow function

Показать описание
#short
#javascript
#promise
#async-await
#arrow-functions
I can mark a JavaScript function as "async" (i.e., returning a promise) with the async keyword. Like this:
async function foo() {
// Do something
}
What is the equivalent syntax for arrow functions?
#javascript
#promise
#async-await
#arrow-functions
I can mark a JavaScript function as "async" (i.e., returning a promise) with the async keyword. Like this:
async function foo() {
// Do something
}
What is the equivalent syntax for arrow functions?