Problem 25. 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!

let age = prompt(`Enter age`);
age = Number.parseInt(age);
                    
// if (age >= 18) {
//   alert(`hey buddy! you can drive`);
// } else {
//   alert(`oops! you can't drive`);
// }
                    
const canDrive = (age)=>{
    return age>18?true:false
}
                    
if (canDrive(age)) {
    alert(`hey buddy! you can drive`);
} else {
    alert(`oops! you can't drive`);
}