There is a code:
n = output.push(objects[0][i]) - 1; output[n].link = "/img/blank.gif"; When executed, it changes both output[n].link and objects[0][i].link
How can I avoid changing the variable objects[0][i].link ?
objects.slice()[0][i] did not help
ADDED: I push the elements of array A to array B. Then I change the newly added element of array B. This changes the element of array A, which I do not need. Question: How to avoid it?
Simply put, I want to return the changed array to the user without changing it on the server.