| redeclare | reassign | scope | initialize | |
|---|---|---|---|---|
| let | β | β | π³ block | β |
| const | β | β | π³ block | β |
| var | β | β | function | "undefined" |
π const
the word const comes from constant, so it shouldn't change at all.
- redeclare -> NOβ
- reassign -> NOβ
- scope -> block! We protect const in block !!
- initialize -> of course NOβ
π let
let is actually almost const except one thing
- reassign -> OK β
π var
var is so much freedom man, it's not recommended now
βΌ and difference of hoisting, I've wrote about it in other article
Top comments (0)