Add prototype to descriptions
This commit is contained in:
@ -6,7 +6,7 @@ tags: date,intermediate
|
||||
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 parameter.
|
||||
- Use `Date.getDate()` and `Date.setDate()` to add `n` days to the given date.
|
||||
- Use `Date.prototype.getDate()` and `Date.prototype.setDate()` to add `n` days to the given date.
|
||||
- Use `Date.prototype.toISOString()` to return a string in `yyyy-mm-dd` format.
|
||||
|
||||
```js
|
||||
|
||||
Reference in New Issue
Block a user