foreach dan ganti item berdasarkan kondisi
arr.forEach(function(part, index, theArray) {
theArray[index] = "hello world";
});
New
arr.forEach(function(part, index, theArray) {
theArray[index] = "hello world";
});
arr.forEach(function(part, index) {
this[index] = "hello world";
}, arr); // use arr as this