Problem 26. Write a program using prompt function to take input of age as a value from the user and use alert to tell him whether he can drive! Use confirm to ask the user if he wants to see prompt again.

const canDrive = (age)=> {
    return age>=18?true:false;
}
                  
let promptAgain = true;
                  
while (promptAgain) {
    let age = prompt(`Enter age`);
    age = Number.parseInt(age);
                    
    if (canDrive(age)) {
        alert(`hey buddy! you can drive`);
    } else {
        alert(`oops! you can't drive`);
    }
                    
    promptAgain = confirm(`Do you want to see prompt again.`);
}