Hi all
Could anyone help please?
I am a bit stuck with this one. As you can see from the below code, the racers registered late, so the ‘if (age => 18 && registeredEarly === true){’ command should not execute, but the ‘} else if (age => 18 && !registeredEarly === true’ should.
this outputs - You will race at 9:30 am with race number 395 GOOD LUCK
let raceNumber = Math.floor(Math.random() * 1000);
const registeredEarly = false;
const age = 19;
if (registeredEarly === true && age >= 18) {raceNumber += 1000};
if (age => 18 && registeredEarly === true){
console.log (You will race at 9:30 am with race number
,raceNumber , GOOD LUCK
);
} else if (age => 18 && !registeredEarly === true){console.log (You will race at 11:00 am with race number
, raceNumber , GOOD LUCK and register earlier next time!!
);};
I’m a bit confused.
Thank you