Take a note...
-
JavaScript ES6+: var, let, or const?
'var' is now the weakest signal available when you define a variable in JavaScript. The variable may or may not be reassigned, and the variable may or may not be used for an entire function, or just for the purpose of a block or loop.