Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created May 26, 2021
Embed
What would you like to do?
Codecademy export
let raceNumber = Math.floor(Math.random() * 1000);
let registeredEarly = true;
let runnersAge = 15;
if (registeredEarly && runnersAge > 18){
raceNumber += 1000;
}
if (registeredEarly && runnersAge > 18){
console.log(`Race will begin at 9:30, your race number is ${raceNumber}`);
}
else if(!registeredEarly && > 18){
console.log(`Race will begin at 11:30, your race number is: ${raceNumber}`);
}
else if( age < 18){
console.log(`Race will begin at 12:30, your race number is: ${raceNumber}`);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment