Problem for spaced dates

Hi my friend
sorry for not having answered earlier thank you for the return but I am a beginner in the coding in your opinion I should write it like that?

function addDays(days) {
var date = new Date(); // today
date.setDate(date.getDate() + days); return date;
}
$w.onReady( function () {
let query = wixLocation.query;
console.log(query.param);
$w(" #datePicker1 “).minDate = addDays(0);
$w(” #datePicker2 ").maxDate = addDays( 2 * 24 * 3600 * 1000 );
});