Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

Timeline for How to update javascript object

Current License: CC BY-SA 3.0

11 events
when toggle format what by license comment
Dec 2, 2014 at 14:08 vote accept Leah Collins
Dec 2, 2014 at 13:59 answer added ekad timeline score: 1
Dec 2, 2014 at 13:55 comment added Mark Walters How about something like this - > jsfiddle.net/6whsLvuo
Dec 2, 2014 at 13:38 comment added rahpuser at the end you are changing all elements, when you do new_user = users[i]; you copy the ref
Dec 2, 2014 at 13:38 comment added War10ck It's not that you're doing anything wrong, but how JavaScript handles the values. See stackoverflow.com/questions/518000/… for more details...
Dec 2, 2014 at 13:38 answer added Haneev timeline score: 7
Dec 2, 2014 at 13:37 comment added Leah Collins @ekad i am sure all had different names.
Dec 2, 2014 at 13:36 comment added ekad Are you sure that all of the other elements had name other than Jack before you do users[l].name = 'Jack'?
Dec 2, 2014 at 13:35 comment added Leah Collins My bad i missed the -1. Sorry
Dec 2, 2014 at 13:32 comment added rahpuser var l= users.length-1;
Dec 2, 2014 at 13:31 history asked Leah Collins CC BY-SA 3.0