For this Question: Given the number of the month, your task is to calculate the number of days present in the particular month.

<b>Note:-</b> 
Consider non-leap yearUser task:
Since this is a functional problem you don't have to worry about the input. You just have to complete the function <b>numberofdays()</b> which contains M as a parameter.

<b>Constraints:-</b>
1 <= M <= 12Print the number of days in the particular month.Sample Input 1:-
1

Sample Output 1:
31

Sample Input 2:-
2

Sample Output 2:-
28, I have written this Solution Code: function numberOfDays(n)
    {
      let ans;
        switch(n)
        {
            case 1:
            case 3:
            case 5:
            case 7:
            case 8:
            case 10:
            case 12:
                ans = Number(31);
                break;
            case 2:
                ans = Number(28);
                break;
            default:
                ans = Number(30);
                break;
                 
        }
        return ans;
    }, In this Programming Language: JavaScript, Now tell me if this Code is compilable or not?