Problem with If/Else statement, Unexpected token if

Problem with If/Else statement, Unexpected token if
0

#1

let raceNumber = Math.floor(Math.random() * 1000);
let registrationTime = True;
let runnerAge = 20;

}

if (registrationTime && runnerAge > 18)
{ raceNumber += 1000
}

if (runnerAge > 18 && registrationTime)
{
console.log(‘You will race at 9:30am, your race number is: ${raceNumber}’)
}

Getting an error that says

if (registrationTime && runnerAge > 18)
^^
SyntaxError: Unexpected token if

What’s wrong with my code?


#2

You have a closing curly bracket before your if statement that has no match.