For variables, I found the following quote from my bootcamp valuable:
Use var... never.
Use const... for every other variable.
Best practice is to always declare variables with const and then, if you later realize that the value has to change over the course of your program, circle back to change it to let.
var keyword allows us to overwrite variable declarations without an error. Unlike, const or let where a variable with the same name can only be declared once.
The var keyword is declared globally, or locally if declared inside a function. Unlike the let keyword, which inside a block, statement, or expression, its scope is limited to that block, statement, or expression.
I found other blogs on var, const, and let that may be helpful:
Look what I did! It is small but it is just the beginning
As always, thanks for reading!
Song of the day: Throwback