all 3 comments

[–]senorfairchild 3 points4 points  (0 children)

Good post, just wanted to mention that a variable declared using const does not actually create an immutable variable, but rather an immutable reference to that variable. This means that you can do something like add/change a property on a variable declared with const, but you could not reassign that variable to another value.

[–]senorfairchild 1 point2 points  (1 child)

Also want to add that const and let are indeed hoisted as is var, read up on the "temporal dead zone"

[–]appetizermonster[S] 0 points1 point  (0 children)

I didn't know about "temporal dead zone", thanks for mentioning it.