in the following code snippet, a "for of" iterates over an array and adds 1 to each element in the array.
Why doesn't that transformation persist? When the second "for of" iterates over the same array, none of the elements reflect the transformation performed in the first "for of"
Thank you
let iterable = [10, 20, 30];
for (let value of iterable) {
value += 1;
console.log(value);
}
for (let val of iterable) {
console.log(val);
}