If else statement code!


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!”);

Hi @ashtavakrawillwin,

Hint: check for your missing brackets. :slight_smile:

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

1 Like

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