Not understanding why this won't print

So I’m really not understanding what I’m doing wrong here. This looks like it all checks out, but nothing gets printed to the output??? With how I wrote it, it’s supposed to print ‘We can eat later!’ right? But it’s just blank- no error or anything. The only hint I get asks if I created the if/else statement and whether or not I set hungerLevel to the right value.


let hungerLevel = 5;
if (hungerLevel > 7) {
console.log=(‘Time to Eat!’);
} else {
console.log=(‘We can eat later!’);

.log is method, not a variable. The above overwrites it in the namespace so you will need to refresh the page to restore JavaScript to normal.


console.log("some text");



Ohhh I see. Thank you haha


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