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 runnerNumber = Math.floor(Math.random()*1000); | |
const registeredEarly = true; | |
const runnerAge = 20; | |
if (runnerAge>18 && registeredEarly) { | |
runnerNumber+=1000; | |
} | |
if (runnerAge>18 && registeredEarly) { | |
console.log(`Runner:${runnerNumber}: Your race starts at 9:30`); | |
} else if (runnerAge>18 && !registeredEarly) { | |
console.log(`Runner:${runnerNumber}: Your race starts at 11:00`); | |
} else if (runnerAge < 18) { | |
console.log(`Runner:${runnerNumber}: Your race starts at 12:30`) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment