Why do javascript functions need to have the keyword “async”? Isn't the “await” keyword enough? [closed]
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 years ago . Improve this question For instance, why does the function below need to have "async".. isn't using await specific enough for the compiler to parse the code without ambiguity? # Why do we need async here async function foo() { var user = await getUser(user_id); console.log