change the value of array in for each code example
Example: forEach modify array JavaScript
arr.forEach(function(part, index) {
this[index] = "hello world";
}, arr); // use arr as this
arr.forEach(function(part, index) {
this[index] = "hello world";
}, arr); // use arr as this