The code is as follows:
const runnerEarly = true; // Change as fit.
const runnerAge = 19; // Change as fit.
runnerAge > 18 ? (raceNumber += 1000) : raceNumber;
if ((runnerAge > 18 && runnerEarly)) {
console.log(
`Hello! Your number is ${raceNumber} and you will compete at 9.30 am.`
);
} else if ((runnerAge > 18 && !runnerEarly)) {
console.log(
`Hello! You will race at 11 am, and your race number is ${raceNumber}.`
);
} else if ((runnerAge < 18)) {
console.log(
`Hello, you will race at 12.30pm.`
);
} else {
console.log(
"Please proceed to the registration desk.";
); // This condition is for runners who are exactly 18 yo. We did not consider them to be part of 18+.
}
This was part of the Codecademy JS course.