let date = new Date();
// add a day
date.setDate(date.getDate() + 1);
function addDays(date, days) {
var result = new Date(date);
result.setDate(result.getDate() + days);
return result;
}
function addDays(date, days) {
const copy = new Date(Number(date))
copy.setDate(date.getDate() + days)
return copy
}
const date = new Date();
const newDate = addDays(date, 10);
var date = new Date();
// add a day
date.setDate(date.getDate() + 1);