I'm working with dates and my code is like the following:
(currentDate is just the actual date to remember and shownDate is a variable that is changed in a function to get date specific data from my database
var currentDate = new Date();
var shownDate = currentDate;
Now if I change shownDate (like add 7 days) currentDate is changed as well. I know that assigning variables like that makes shownDate something like pointing at currentDate thus changing it as well.
Let me know if you need some more code or anything else.