JS Control Flow part 4/9


#1

Im havig trouble with JS control flow 4/9
my code looks like this so far:
let raceNumber = Math.floor(Math.random() * 1000);
let registeredEarly = false;
let age = 15;

this is what i am supposed to do:

Create a control flow statement that checks whether the runner is an adult AND registered early.
Add 1000 to their raceNumber if this is true.

the hint says this:
A runner is an adult if their age is over 18.
You’ll need to use an if statement, the && logical operator, and the mathematical assignment operator +=.

I don’t know how to type this. Can anyone help?


#2

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