Race Day

let raceNumber = Math.floor(Math.random() * 1000);
let registeredEarly = true ;
let age = 19;
if(age && registeredEarly);{
console.log(raceNumber + 1000);

if (age > 18 && registeredEarly);{
console.log(“correran 9:30hs”, raceNumber + 1000);
}else if (age > 18 && !registeredEarly){
console.log( ‘Adultos tarde; correrán a las 11:00 hs’, raceNumber + 1000);
}else if( age < 18){
console.log( “Los jovenes competiran a las 12:30” raceNumber );

¿ qúe es lo que esta mal? . Me salta error de sintaxis

It would be helpful if you format your code. See

I see several errors, but your syntax error is probably in this line:

Look at the difference between the line above, and the following line.

console.log( "Los jovenes competiran a las 12:30" raceNumber );
console.log("correran 9:30hs", raceNumber + 1000);
Additional Hint

You have the same error in one other place. The semicolon there separates your if condition from the block of code. The block of code will always execute regardless of whether or not the condition evaluates to truthy.

1 Like

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