javascript for loop changes original list variable
问题 I have a collection of objects called the response and I am creating another variable called object that's an empty object and creating object.array and set it to the response variable. I would think I am creating a new scope. However, if I set the age inside object.array as null, this sets the age in my response array to null . Why is this happening and how can I create a duplicate variable that doesn't affect the original? I need to keep the above variables as is. So object needs to be an