At the exit, I get those elements that were originally. That is, the assignment does not work.
function deleteOtherChars(arr) { for (var i = 0; i < arr.length; i++) { for (var j = 0; j < arr[i].length; j++) { arr[i][j] = 'd'; console.log(arr[i][j]); } } //console.log(arr); } var arr = ['aaaaa','bbbbb', 'ccccc']; deleteOtherChars(arr);