I dont undertsrand why my code is not working for Race Day assignemnt?

it says there is an error, but i don’t understand why, and the weird because when “let runnersAge = 25;” and i change it to 'let runnersAge = 2;" it works to reveal the last if statement, but when i put any other numberPreformatted text it says there is an error, i have no idea why.my code his here:

let raceNumber = Math.floor(Math.random() * 1000); const earyRegistar = true; let runnersAge = 25; if (runnersAge >= 18 && earyRegistar) { raceNumber += 1000; } if (runnersAge >= 18 && earyRegistar) { Console.log(`Congrats you are an early registree you will race at 9:30am and your number is ${raceNumber}`); } else if (runnersAge >=18 && !earyRegistar) { consle.log(`Late adults run at 11:00 am and your number is ${raceNumber}`); } else if (runnersAge <= 17) { console.log(`Youth registrants run at 12:30 pm. Your race number is ${raceNumber}`); } else { console.log('come to the desk to register) }

I also added a picture just in case:

Hello, @golden-dragon, and welcome to the forums.

You’ve got a few errors that are all likely typos. The error message(s) shows you exactly where to look, and describes the error pretty clearly. Look over your code on the lines shown in the error messages, and see if you can find the typos.

Hint for the error in your screenshot:

Console is not the same as console.

LOL~!~~ I didnt catch that! thanks so much i will try to change that in my code and see what happens…

It works! thanks so much! I will keep my eye out for those tiny errors :slight_smile:

1 Like

I know at first the error messages just look like scary red goblitty gook, but they are actually quite helpful.
Try changing your values for runnersAge and earlyRegister, and you’ll uncover a couple more errors.

ok I will do that now…

I found another error with another ‘console’ statement :slight_smile:

1 Like

That is probably all of them. I just noticed that your screenshot doesn’t include one of the errors from your codebyte. Happy Coding!

Thanks for your help, I appreciate it! :slight_smile:

1 Like