I did the exercise like this. It’s not very clear why i need to write raceNumber+=1000 to the first statement. Somebody can explain me why?
let raceNumber = Math.floor(Math.random() * 1000);
const earlyRegistered = true;
const Age = 18;
if (Age > 18 && earlyRegistered) {
raceNumber+=1000; (this line)
}
if (Age > 18 && earlyRegistered === ‘true’) {
console.log('Partecipant ’ + raceNumber +‘th the race will start at 9:30 am’);
} else if (Age > 18 && earlyRegistered === false) {
console.log('Partecipant ’ + raceNumber +‘th the race will start at 11:00 am’);
} else if (Age < 18) {
console.log('Partecipant ’ + raceNumber +‘th the race will start at 12:30 pm’);
} else {
console.log(‘Approach the registration’)
}