let , const 建立的變數都是塊級作用域:它們只存在包圍它們的最深程式碼塊中。 function func() { if (true) { let tmp = 123; // const tmp = 123; } ...
確定! 回上一頁