When defining an asynchronous function I normally go for
async function myFunc(){
// ...
}
I would like to switch over to lambda expressions. I tried
async myFunc() => { // throws an syntax error
// ...
}
and
myFunc = async () => { // weird things come up
// ...
}
I think the second example does not work because this code would try to store the functions result into myFunc
like
let myFunc = f(); // store the result
Is it possible to define functions with lambda expressions or are they only used within other functions?