Hi guys,
Very simple code I would expect to work different:
I would like to push dates to an array within the following loop.
I thought I will get the same result for the test array as in the console.log(date) but see what I get???
What is it, I am doing wrong here?
export async function button11_click(event) {
let test =
let date = new Date();
let enddate = new Date()
enddate.setDate(date.getDate() + 30); while (date < enddate) {
test.push(date)
console.log(date)
date.setDate(date.getDate() + 5)
}
console.log(test)
}