Javascript switch statement with months
<p>I have a assignment where the user puts in a number inside a prompt box and the month comes out. Here is code so far:</p>

<pre><code>&lt;script type="text/javascript"&gt;
var a = prompt("enter a month number please.");

var b = "";

    switch(a){
        case 1: b = "January";
            break;
        case 2: b = "February";
            break;
        case 3: b = "March";
            break;
        case 4: b = "April";
            break;
        case 5: b = "May";
            break;
        case 6: b = "June"; 
            break;
        case 7: b = "July";
            break;
        case 8: b = "August";
            break;
        case 9: b = "September";
            break;
        case 10: b = "October";
            break;
        case 11: b = "November";
            break;
        case 12: b = "December";
            break;
        }

if((a==12) || (a==1) || (a==2)){

    document.write(" It is " + a + ", which is in winter.")
}

if((a==3) || (a==4) || (a==5)){

    document.write(" It is " + a + ", which is in spring.")
}

if((a==6) || (a==7) || (a==8)){

    document.write(" It is " + a + ", which is in summer.")
}

if((a==9) || (a==10) || (a==11)){

    document.write(" It is " + a + ", which is in fall.")
}

&lt;/script&gt;
</code></pre>

<p>My months are not the output. Instead, the number is my output. It seems my switch statement is being ignored and only doing the if statements. I am lost at what i'm doing wrong.</p>
