let age = 23;
let day = 'Monday';
let price;
if (age <= 12) {
price = 50;
}
if (age >= 65) {
if (day === 'Saturday' || day === 'Sunday') {
price = 70;
}
else {
price = 80;
}
}
if (age > 12 && age < 65) {
price = 100;
}
console.log(price);
Created
July 6, 2022 07:23
-
-
Save McLarenCollege/f7ee032a84e66d91410ce02705aa03f2 to your computer and use it in GitHub Desktop.
Ticket Price Using If Else If Part1 Solution
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment