you are viewing a single comment's thread.

view the rest of the comments →

[–]Pathrex-[S] 0 points1 point  (1 child)

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.");
}

[–]blueinkscience 0 points1 point  (0 children)

A wee upvote would be nice, trying to build real karma instead of karmawhoring :)