Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
yihan12 authored Dec 12, 2023
1 parent d831f0f commit e675340
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion javascript/variables/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ let total = price1 + price2;

|区别|var|let|const|
|----|----|----|----|
| 能发被重复声明 ||||
| 能否被重复声明 ||||
| 能否被重新赋值 ||||
| 作用域 | 全局作用域和函数作用域 | 块级作用域 | 块级作用域 |
| 变量是否被提升| 能,会被提升到顶部,任意地方能访问| 否(必须在使用前声明) | 否 (必须在使用前声明)|
| 重新声明的位置| 程序任何地方|可以在块级作用域外重新声明|不能重新声明|

# Hoisting(变量提升)

Expand Down

0 comments on commit e675340

Please sign in to comment.