Replacing Array Elements In Javascript Produces Unexpected Results Stack Overflow

Replacing Array Elements In Javascript Produces Unexpected Results Stack Overflow