Says it's not returning when numHours is 5


#1

var sleepCheck=function(numHours) {
if(numHours>=8) {
return "You're getting plenty of sleep! Maybe even too much!";
}
else {
return "Get more shut eye!";
}
};
console.log(sleepCheck(10));
console.log(sleepCheck(5));
console.log(sleepCheck(8));
Just tried this. It says it's not returning when numHours is 5. What am I doing wrong ;-;


Lesson 12: Functions & if/else
#2

This post was flagged by the community and is temporarily hidden.


#3

I have it exactly like yours but it keeps telling me this.
Oops, try again. It looks like your function doesn't return "Get some more shut eye!" when numHours is 5. Check your if / else syntax and whether you're using the correct comparison operator.
I know I'm using the correct comparison operator. So what else could it be?


#4

This post was flagged by the community and is temporarily hidden.


#5

I didn't everything is typed correctly.


#6

This post was flagged by the community and is temporarily hidden.


#7


#8

This post was flagged by the community and is temporarily hidden.


#9

It says the same thing.


#10

Take another look at your outputs compared to the error message. You are missing one word.


#11

Oh I see it now. I forgot "some". Thank you.


#12

try to copy and past the text from the returned message, as it's written


#13

esayez de copier coller le text du message d'erreur, comme c'est libellé, ça pourrait marcher. c comme ça que j'ai regleé le mien


#14

Hey thanks for asking this question @bigsnake I was stuck here as well!


#15

No problem. I'm just glad I wasn't the only one stuck on this.