Comparison Operators

Notice that since hungerLevel is 5, (hungerLevel > 7) evaluates to false, therefore the else’s code block runs.

Now set the hungerLevel variable equal to 10, and run your code again.

var hungerLevel = 10;
if (hungerLevel > 7){
console.log('Time to Eat! ');
} else {
console.log('Let’s eat later. ');

When I changed it to 10, I can’t go to the next step.

Hi Nikolay,

Something happened to your new topic template.

Link to exercise:

The first thing I would suggest is to use exactly the string that the exercise is expecting. Your false string, this:

'Time to Eat! '

is not exact.

Thank You alot, I saw the mistake.

1 Like

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