diff --git a/ifStatement.js b/ifStatement.js index a1c9316..2f77d7c 100644 --- a/ifStatement.js +++ b/ifStatement.js @@ -13,6 +13,14 @@ Note: You can change the value of the age variable to test different cases. If the person's age is less than the minimum driving age, nothing will be printed. ************************************************************************************************/ // TODO: ADD YOUR CODE BELOW +let userAge =19; +let minDrAge=18; +if(userAge>=minDrAge){ + console.log(" the person is old enough to drive."); +} +if(userAge0){ + console.log("that it is positive"); + } + if(convnum<0){ +console.log("it is negative"); + } + if(convnum==0){ + console.log("is zero"); + } + /************************************************************************************************* Task 4 (if..else Statement): @@ -59,6 +90,11 @@ Steps: - If the user is younger than 18, the program should calculate how many years are left until they turn 18 and print the message "You will be eligible to vote in X years", where X is the number of years left. ************************************************************************************************/ // TODO: ADD YOUR CODE BELOW +let agess=18; +let chage=prompt("enter the age vote"); +if(agess===chage){ + console.log("if you rigersterid"); +} /************************************************************************************************* Task 5 (if..else Statement):