Hi everyone, I’m fairly new to this and have a similar problem with the same challenge using the if statement. The section specifically states to use an ‘if’ statement to check if the runner is over 18 and also whether the runner registered early. If so, to then add 1000 to the race number. But…

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

let earlyRegister = true;

let runAge = 19;

if (runAge >= 18 && earlyRegister = true) {

raceNumber += 1000

}

…I get the following response:

if (runAge >= 18 && earlyRegister = true) {

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

ReferenceError: Invalid left-hand side in assignment

I have no idea what I need to do and wondered if someone can guide me some way through it. Much appreciated.