The distinction between the variable types created by var
and by let
is significant, and a switch to let
will help alleviate many of the variable scope issues which have caused confusion in the past.
This rule raises an issue when var
is used instead of const
or let
.
var color = "blue"; var size = 4;
const color = "blue"; let size = 4;