Not at all, using let will achieve the same result. However, I would say it is a good practice to use const (and immutables in general) as much as possible. It simply makes code easier to reason about. If later we discover we absolutely have to somehow change the value, we can always use let instead of const.
Not at all, using
let
will achieve the same result. However, I would say it is a good practice to useconst
(and immutables in general) as much as possible. It simply makes code easier to reason about. If later we discover we absolutely have to somehow change the value, we can always uselet
instead ofconst
.