Javascript race day challenge

Welcome to the Get Help category!

This is where you can ask questions about your code. Some important things to remember when posting in this category :slight_smile:

  • Learn how to ask a good question and get a good answer!
  • Remember to include a link to the exercise you need help with!
  • If someone answers your question, please mark their response as a solution :white_check_mark:
  • Once you understand a new concept, come back and try to help someone else!

hello everyone i m beginner and im trying to do race day challenge on js course somebody can check if my code is good i have a logical answer in the console but i m not sure if i did it in the good way
let raceNumber = Math.floor(Math.random(0.5) * 1000);

const registeredEarly = true;
let runnerAge = 20;
if (registeredEarly === true && runnerAge > 18) {
console.log(You registered early so you will run at 9:30am with number ${raceNumber +=1000});
} else if (registeredEarly === false && runnerAge > 18) {
console.log(You registered lately so will run at 11:00am with number ${raceNumber +=1000});

answer in console

You registered early so you will run at 9:30am with number 1520

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.