4 ms·
let/var solve a different problem than the question of whether the array itself is mutable. Look back at the OP, and in particular at the last example section,
by blahedo 12y ago
let/var solve a different problem than the question of whether the array itself is mutable. Look back at the OP, and in particular at the last example section, which lays out the behaviour of various combinations of let/var with mutable/immutable arrays. Each of these behaviours is desirable in different circumstances, and more importantly, by separating the concerns here it will make the language semantics easier to understand and apply to new examples.