Currently, I am utilizing VS Code along with TSLint. In one instance, TSLint recommended that I change the declaration of an array variable from let
to const
, providing this code snippet:
let pages = [];
"Identifier 'pages' is never reassigned; use 'const' instead of 'let'. (prefer-const)"
However, considering that arrays are mutable variables, why would using const
be preferred over let
in this context?