Why are await and async valid variable names?
问题 I was experimenting with how / is interpreted when around different keywords and operators, and found that the following syntax is perfectly legal: // awaiting something that isn't a Promise is fine, it's just strange to do: const foo = await /barbaz/ myFn() Error: Uncaught ReferenceError: await is not defined It looks like it tries to parse the await as a variable name ..? I was expecting await is only valid in async function or maybe something like Unexpected token await To my horror, you