Javascript definitely isn\'t my strongest point. I\'ve been attempting this for a couple of hours now and seem to be getting stuck with date formatting somewhere.
I
You can do this :
let numWeeks = 2; let now = new Date(); now.setDate(now.getDate() + numWeeks * 7); alert(now);
You can see the fiddle here.
According to the documentation in MDN
The setDate() method sets the day of the Date object relative to the beginning of the currently set month.