I see many uses of const, and a few let's - which ones would you change to const?
A better question would be: which ones would you not change to `const`?
`const` prevents surface-level mutation (though you can still modify the parts of the thing). `let` has sane scoping rules. Sadly neither has both: `let` is fully mutable and `const` has crazy scoping rules. So using `const` over `let` isn't a strict improvement.
Source? Their scoping rules should be exactly identical....
That's new to me. What's crazy about the scope of const?
Wow, I just completely misremembered that. Sorry!
Let and const have the same scope, var is the one with weird rules