Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created January 2, 2019 15:42
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save codecademydev/0c75df2f10d181f5995029740d349bd1 to your computer and use it in GitHub Desktop.
Codecademy export
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