Display name of the month from the current date using javascript

This code is to display name of the month from the current date.
<p id="demo"></p>
function myFunction() {
    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 d = new Date();
    var n = month[d.getMonth()];
    document.getElementById("demo").innerHTML = n;
source : http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_date_getmonth
  pic screenshot from : http://s345014333.onlinehome.us/LoganGreer/wordpress/

Popular posts from this blog

npm refusing to install as a dependency of itself

How to call javascript functions from VB.NET and using WebBrowser Control