JavaScript Program to Display Current Month

Write a JavaScript program to display current month. This program will read date and after that it will display the month of the year.

Source Code

    <title>Display current month</title>
<h3>Current month</h3>
<p id="day"></p>
<script type="text/javascript">
    switch(new Date().getMonth())
        case 0: document.write("January");  break;
        case 1: document.write("February");  break;
        case 2: document.write("March");  break;
        case 3: document.write("April");  break;
        case 4: document.write("May");  break;
        case 5: document.write("June");  break;
        case 6: document.write("July");  break;
        case 7: document.write("August");  break;
        case 8: document.write("September");  break;
        case 9: document.write("Octobar");  break;
        case 10: document.write("November");  break;
        case 11: document.write("December");  break;