Skip to main content

One post tagged with "javascrip"

View All Tags

JavaScript Hoisting

· 2 min read
Ivan Tsai
Backend engineer

在 JavaScript 中,會把變數定義的部分移到最前面執行,在 W3C 中提到:

Hoisting is JavaScript's default behavior of moving declarations to the top.

這個行為稱為 Hoisting (提升)