A static method getMonth() that receives as formal parameter a number between 1 and 12 inclusive, representing a month of the year and returns the name of that month such as January, February, etc code example
Example 1: javascript getmonth
new Date().getMonth();
Example 2: getmonth javascript
var date=new Date();
var month=new Array();
month[0]="January";
month[1]="February";
month[2]="March";
month[3]="April";
month[4]="May";
month[5]="June";
month[6]="July";
month[7]="August";
month[8]="September";
month[9]="October";
month[10]="November";
month[11]="December";
var n = month[date.getMonth()];