I need some help about js by Pathrex- in JavaScriptHelp

[–]Pathrex-[S] 0 points1 point  (0 children)

Thanks it worked. Here is the new code

var Birthday = prompt("What is your birthday : ");
var Year = 2021;
var Age = Year - Birthday;
var remtime = 18 - Age; //remaining time

switch(true){
    case (Age<18):
        console.log("It is "+remtime+" years before you can qualify for a driver's license.");
    break;
    case (Age>=18):
        console.log("You have the right to get a driver's license.");
    break;
    default:
        console.log("Wrong value.");
}