SyntaxFix
Write A Post
Hire A Developer
Questions
Javascript is pass by value, and which essentially means part is a copy of the value in the array.
part
To change the value, access the array itself in your loop.
arr[index] = 'new value';