I have 2 objects: one of them contains the player list and the other one contains players in loading screen.
When i remove a player from playersNotReady object, it also removes the player from the player list and i don't want that.
var players = {
1: "Player1",
2: "Player2"
};
var playersNotReady = players;
delete playersNotReady[1];
console.log(players); // {2: "Player2"}
console.log(playersNotReady); // {2: "Player2"}
Why is this happening and how can i remove player from playersNotReady object without removing them from the actual player list?