Foreach изменить массив JavaScript
arr.forEach(function(part, index) {
this[index] = "hello world";
}, arr); // use arr as this
DGOAT
arr.forEach(function(part, index) {
this[index] = "hello world";
}, arr); // use arr as this