addDaysToDate
Calculates the date of n
days from the given date, returning its string representation.
- Use
new Date()
to create a date object from the first argument. - Use
Date.prototype.getDate()
andDate.prototype.setDate()
to addn
days to the given date. - Use
Date.prototype.toISOString()
to return a string inyyyy-mm-dd
format.