-
-
Save codecademydev/7f7384d57ae6faeb73bf5a106749eddb to your computer and use it in GitHub Desktop.
Codecademy export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let raceNumber = Math.floor(Math.random() * 1000); | |
const registeredEarly = false; | |
const registeredLate = true; | |
const age = 19; | |
if (age > 18 && registeredEarly) { | |
console.log('The race will begin for the early over 18s at 9:30am and your race number is ' + (1000 + raceNumber)); | |
} | |
else if (age > 18 && registeredLate) { | |
console.log('The race will begin for the late over 18s at 11:00am and your race number is ' + (raceNumber)); | |
} | |
else if (age < 18) { | |
console.log('The race will begin for the under 18s at 12:30pm and your race number is ' + (raceNumber)); | |
} | |
else if (age === 18 || registeredEarly) | |
console.log('For peaple who are 18, please refer to the registration desk.') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment