Skip to content

Instantly share code, notes, and snippets.

@codecademydev

codecademydev/main.js Secret

Created Jan 2, 2019
Embed
What would you like to do?
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