When to use 'let' and when to use 'const'
evertpot.com
evertpot.com
But one thing I'd like to know more about is how const and let are handled under the hood (at the engine level). I have some (probably wrong) theories about what happens, but I'd like a comprehensive explanation if anyone has a good link.
This articles makes me wonder why `var` is still a thing. Is it deprecated (or slated to be deprecated soon)? If not, why?
The rule is pretty simple: use `const` always, unless you can't because you are doing a reassign, in which case use `let`.