Race day Project

Hi

could somebody help me with my code wont work. It doesnt return any error i just get a blank screen with nothing logged. This is for the race day project:

let raceNumber = Math.floor(Math.random() * 1000);

const registeredEarly = false;
const age = 18;
if (registeredEarly && age > 18) {
raceNumber += 1000;
}
if (registeredEarly && age > 18) {
console.log(Number ${raceNumber} you will race at 9.30am);
} else if (!registeredEarly && age > 18) {
console.log(Number ${raceNumber} you will race at 11.00am);
} else if (age < 18) {
console.log( Number ${raceNumber} you will race at 12.30pm);
}

const age = 18;

None of your if/else-if conditions are met when age is exactly 18. Therefore, nothing prints to the console.
Try changing the age to values less and greater than 18. You should see output on the screen.

As for the exactly 18 years situation, the last step of the project suggests an else statement telling the runner to see the registration desk.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.