外觀
禁止從 await 表達式存取成員。
await
當從 await 表達式存取成員時,await 表達式必須使用括號包住,這會降低可讀性。
async function bad() { const secondElement = (await getArray())[1]; } async function good() { const [, secondElement] = await getArray(); }