Need help on Race Day Project


#1

Having problems getting this error "/home/ccuser/workspace/learn-javascript-U2P2/main.js:7
}if else (runReg == true || raceNumber < 1000 ) {"

var runReg =  true;
var runAge = 25;
let raceNumber = Math.floor(Math.random()*1000);
if (runAge > 18 && runReg == true && raceNumber < 1000) {
    console.log("You will run race at 9:30 am " + raceNumber);
    
    }ielse if(runReg == true || raceNumber < 1000 ) {
      console.log("you will race at 11:00 am");
      
    }else if(runAge < 18 && raceNumber > 1000) {
      console.log("You will race at 12:00 am);
      
    }else{
        console.log(" If unsure when you are running check registration desk");
         
 }

#2

An invalid LET and an invalid ELSE-IF and a missing double-quote


#4

Please update code. Following code copied from your post.It has an extra letter 'i' before else if statement.

}ielse if(runReg == true || raceNumber < 1000 ) {
console.log("you will race at 11:00 am");

I hope it helps


#5

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