Hi guys,
I'm pretty sure this question has been asked before but I couldnt find anything even though I tried alot of different descriptions for my problem. So this is what I do. I have a js-File that basically looks like this
- abc = function(){
- var initialStartTime = new Date();
-
return{
init: function(){
currentAgenda = ...//something from localStorage
initialStartTime = new Date(currentAgenda[0].startTime)
}, updateAgenda: function(){
currentStartTime = initialStartTime;
currentStartTime = new Date(some new Date);
}
}
I want my initialStartTime to be set one time in the init-Function. However if I change the currentStartTime it always also changes my initialStartTime
Any ideas how i can prevent that from happening? Thanks alot in advance
Greetings Chris