在作用域上, var 可以是全域、也可以是以函式作為範圍; let 與 const 則是以區塊作為範圍。 · 在宣告上, var 可以被重複宣告,但是 let 與 const 則不行。
確定! 回上一頁