Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created February 6, 2021 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/26c7382b8742126bc4cdacca717ed18a to your computer and use it in GitHub Desktop.
Save codecademydev/26c7382b8742126bc4cdacca717ed18a to your computer and use it in GitHub Desktop.
Codecademy export
let raceNumber = Math.floor(Math.random()*1000);
const registeredEarly = true;
const ageOfRunner = 20;
if(ageOfRunner >18 && registeredEarly){raceNumber += 1000};
if(raceNumber > 1000){console.log("The runner with number over 1000 will start race at 9:30.")};
else if(ageOfRunner > 18 && !registeredEarly ){console.log("The other adult runner over 18 years old will start race at 11:00.")};
else if(raceNumber > 1000 && ageOfRunner < 18){console.log("Youth registrants will start race at 12:30.")};
else {console.log("Please come to the registration desk.")};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment