This is inbuilt function to get the date of a month from provided Date.
To use this function/method,you need an instance of the class Date .
Create instance of Class Date, to use this method. It could be used only with Date Object
else it will throw error.
var getDate = new Date();