For this Question: Implement the function <code>floor</code>, which should take a number which can be a float(decimal)
and return its result as an integer with floor function applied to it (Use JS In built functions)Function will take a float as inputFunction will return a numberconsole.log(floor(1.99)) // prints 1

console.log(floor(2.1)) // prints 2

console.log(floor(-0.8)) // prints -1, I have written this Solution Code: function floor(num){
    // write code here
    // return the output , do not use console.log here
    return Math.floor(num)
}, In this Programming Language: JavaScript, Now tell me if this Code is compilable or not?