If/else error


#1

https://www.codecademy.com/courses/learn-javascript/lessons/control-flow/exercises/comparison-operators?action=lesson_resume

I can't find the error in my code. Please help!


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

#2

Nevermind! I realized I needed console.log after the else :smiley:


#3

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