If else statement code!


#1

hullo.

what exactly is wrong with these lines of code? It just won’t print.

let hungerLevel = 5;
if hungerLevel>7{
console.log(“Time to eat!”);
}
else {
console.log(“we can eat later!”);
}


#2

Hi @ashtavakrawillwin,

Hint: check for your missing brackets. :slight_smile:

Look back the syntax of writing an if/else statement.


#3

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