Better wording of exercise description (#47431)

Update mutate-an-array-declared-with-const.md

Fixed unclear part of the exercise description. As cited by user [in the forum](https://forum.freecodecamp.org/t/cannot-understand-the-following-line-in-question/549786/3)
This commit is contained in:
Santiago Miranda
2022-09-02 19:01:08 +02:00
committed by GitHub
parent 62b7e90b75
commit a9d2198aba

View File

@@ -23,7 +23,7 @@ s[2] = 45;
console.log(s);
```
`s = [1, 2, 3]` will result in an error. The `console.log` will display the value `[5, 6, 45]`.
`s = [1, 2, 3]` will result in an error. After commenting out that line, the `console.log` will display the value `[5, 6, 45]`.
As you can see, you can mutate the object `[5, 6, 7]` itself and the variable `s` will still point to the altered array `[5, 6, 45]`. Like all arrays, the array elements in `s` are mutable, but because `const` was used, you cannot use the variable identifier `s` to point to a different array using the assignment operator.