Lesson 12


#1

My code looks like this

var sleepCheck=function(numHours){
if(sleepCheck>=8){
return"You're getting plenty of sleep! Maybe even too much!";
}
else {
return "Get some more shut eye!";}
}
sleepCheck(10)
sleepCheck(5)
sleepCheck(8)

And im keep getting

Oops, try again. It looks like sleepCheck() isn't returning "You're getting plenty of sleep! Maybe even too much!" when numHours is 10. Check your if / else syntax and whether you're using the correct comparison operator.

I dont know what to do.


#2

Hi here

if(sleepCheck>=8)

Inside your if condition you should put numHours >= 8 like that

if(numHours>=8)

#3

Thanks dude, i'm new to programming so this helps a lot!