I do the following:
var d = new Date();
var dataInicial = new Date(2017, 5, 1);
var dataFinal = new Date(2017, 5, 20);
var percorreDatas = function(){
d = dataInicial;
while(d <= dataFinal){
d.setDate(d.getDate()+1);
console.log("d", d);
console.log("dataInicial", dataInicial);
}
}
percorreDatas();
Why is the variable "initial_database" updating along with the variable "d", if I do not increment it ??????