717 Views
To subtract 30 days from the current date in JavaScript: Use the Date() constructor to create a new Date object with the current date. Call the getDate() method on this object to get the days. Subtract 30 from the return value of getDate(). Pass the result of the subtraction to the setDate() method.
0 comments