Return the day of the month:
The result of n will be:
The getDate() method returns the day of the month (from 1 to 31) for the specified date.
The getDate() method is supported in all major browsers.
|Number||A number from 1 to 31, representing the day of the month|
Return the day of the month from a specific date:
The output of the code above will be:
Your message has been sent to W3Schools.