For this Question: Complete the function <code>checkCanIVote</code>
<ol>
  <li>Takes 2 arguments</li>
<li>1st argument <code>time</code>, which is the number of milliseconds after the function will resolve or reject</li>
<li>Second argument is the <code>age</code> upon (also a number) which you will use to return the string based on logic mentioned below</li>
<li>The function returns a promise, which will have 2 functions as arguments <code>resolve</code> and <code>reject</code> like any other promise.</li>
<li>The <code>resolve</code> function should be called with the argument <code>"You can vote"</code> after x milliseconds if <code>age</code> is greater than or equal to 18</li>
<li>The <code>reject</code> function should be called with the argument with "You can not vote" after x milliseconds if <code>age</code> less than 18</li>
</ol>


Note:- You only have to implement the function, in the example it
shows how your implemented question will be ran.Function will take two arguments

1) 1st argument will be a number which tells after how much milliseconds promise will be resolved or rejected.
2) 2nd argument will be a number (age)Function returns a promise which resolves to "You can vote" or rejects to "You can not vote".
If age >= 18 resolves to "You can vote" else rejects to "You can not vote".checkCanIVote(200, 70). then(data=>{
 console. log(data) // prints 'You can vote'
}).catch((err)=>{
 console.log(err) // does not do anything
})
checkCanIVote(200, 16). then(data=>{
 console. log(data) // does not do anything
}).catch((err)=>{
 console.log(err) // prints 'You can not vote'
}), I have written this Solution Code: function checkCanIVote(number, dat) {
    return new Promise((res,rej)=>{
        if(dat >= 18){
        setTimeout(()=>{
            res('You can vote')
        },number)
        }else{
            setTimeout(()=>{
                rej('You can not vote')
            },number)
        }
        
    })
    // return the output using return keyword
    // do not console.log it

}, In this Programming Language: JavaScript, Now tell me if this Code is compilable or not?