What does it mean to mutate an array?
Consider,
a = [1, 2, 3, 4, 5, 6, 7, 8, 9]
a[4] *= 2
console.log(a) // [1, 2, 3, 4, 10, 6, 7, 8, 9]
When we modify any of the contents of the array, that is mutation.
Consider,
a = [1, 2, 3, 4, 5, 6, 7, 8, 9]
a[4] *= 2
console.log(a) // [1, 2, 3, 4, 10, 6, 7, 8, 9]
When we modify any of the contents of the array, that is mutation.