Answer:
dueDate.setDate(dueDate.getDate() + 21);
Step-by-step explanation:
Given
The following declaration (in JavaScript):
var dueDate = new Date();
Required
Add 21 days to dueDate
Assume the date object is [mydate], the syntax to add [n] number of days to [mydate] in JavaScript is:
[mydate].setDate([mydate].getDate() + n);
In this question:
The variable is dueDate and the number of days is 21
Going by:
[mydate].setDate([mydate].getDate() + n);
The correct option is:
dueDate.setDate(dueDate.getDate() + 21);