Javascript: Why you shouldn't use var

Always use const or let!



linkDoes the value need to be changed? No?

Use const!


linkOtherwise use let!

Let has block scoping advantages over var.


A var has Function scoping, which is less precise than Block scoping.