使用Array.includes 來處理多重條件. // 原始寫法function test(fruit) { // 條件語句if (fruit === "apple" || fruit === "strawberry") { console.log("red fruit"); } ...
確定! 回上一頁