For this Question: <em>The JS Date object has many useful properties. </em>

Implement the function <code>whichDay</code>, which takes a Date object and returns a string
like this "It is the first day of the week" depending on that object it will show the return string, which day of the week it is. (Use JS built-in functions)

Note:- Sunday is the "last" day of the week while rest all days are the first, second, third, fourth, fifth, and sixth dayThe function takes an argument <code>date</code> which is a Date object.The function returns a stringconst date = new Date("2022", "1", "2") // Wed Feb 02 2022
// In the above line we create a Date object using Date Class which is used to create arbitrary dates
console.log(whichDay(date)) // prints "It is the third day of the week", I have written this Solution Code: 
function whichDay(date) {
    // write code here
    // return the output , do not use console.log here
    let str = ""
    switch (date.getDay()) {
        case 0:
            str = 'last'
            break;
        case 1:
            str = 'first'
            break;
        case 2:
            str = 'second'
            break;
        case 3:
            str = 'third'
            break;
        case 4:
            str = 'fourth'
            break;
        case 5:
            str = 'fifth'
            break;
        case 6:
            str = 'sixth'
            break;
        default:
            break;
    }
    return `Today is the ${str} day of the week`
}, In this Programming Language: JavaScript, Now tell me if this Code is compilable or not?