Problem 10. Print "You can drive" or "You cannot drive" based on age being greater than 18 using ternary operator.

let age = prompt("Enter your age: ");    // 19
age = Number.parseInt(age);

/*
if (age >= 18)
    console.log("you can drive");
else
    console.log("you cannot drive");
*/

let res = age>=18 ? "you can drive" : "you cannot drive";
console.log(res);   // you can drive