Https://www.codecademy.com/courses/learn-css/lessons/css-setup-selectors/exercises/chaining-and-specificity

Hi,
I’m learning Javascript if - else lesson at this moment.
Could anyone give me some advice on this please?

So this is the code I’m supposed to write on the lesson I’m working on.
If hungerLevel is higher than 7,
log ‘Time to eat!’, else log ‘We can eat later!’.

so I wrote this ↓

let hungerLevel = 7;

if (hungerLevel>=8) { 
    console.log('Time to eat!');
} else {
    console.log('We can eat later!');
}

hungerLevel = 9
// it prints 'We can eat later!' even tho it's higher than 8. 

Whatever the number I put,
the result is ‘We can eat later!’…
But it gives me the right answer when I change the first code (variable declaration?)
let hungerLevel = 7; to higher numbers.

Isn’t let mutable and if I declare hungerLevel to different number at the end of the code it updates the value of the variable?
What did I miss here?:disappointed:

The lesson gave me green check mark with that code,
so I don’t know if the code is wrong or not but def something is wrong…

I’m so new that I don’t even know what I’m asking, so if the question doesn’t make any sense please be patient with me here! Thanks in advance!

the code runs from top to bottom, so first hunger level is 7:

let hungerLevel = 7;

based on this value is determined what should be logged:

if (hungerLevel>=8) { 
    console.log('Time to eat!');
} else {
    console.log('We can eat later!');
}

then we update the hunger level:

hungerLevel = 9

but by this time, the decision whether or not to eat, has already been made. We would then have to make this decision again.

which means another conditional