javascript - Syntax for an async arrow function

preview_player
Показать описание
#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?
Рекомендации по теме