12/13 It looks like sleepCheck() isn't returning


#1

help this is my programming and I keep getting this error!

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

// Write your function below.
// Don't forget to call your function!
var sleepCheck = function(numHours) {
if (numHours >= 8) {
return "You're getting plenty of sleep!! Maybe even too much";
}
else
{
return "Get some more shut eye!";
}
};
console.log(sleepCheck(10));
console.log(sleepCheck(8));
console.log(sleepCheck(5));


12/13 help
#2

Well the error message is pretty descriptive the output message is not correct. First guess would be the additional !. I also moved this to an own topic as it makes it easier to find unanswered questions and makes old threads better readable to newcomers.


#3

yeah I agree with you there I removed the extra ! and it still gets the same error i really dont know what i'm doing wrong


#4

Add a ! at the end of this sentence :slightly_smiling:
To be honest the syntax is ok so if it is just about typos in the output message copy and paste of the instructions is a valid approach to it.