Can't get it right?


#1



Hello fellow coders

if you are on lesson 12., and keep getting the error message: "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." Make sure that ALL spelling is correct, also check to make sure that you have all the curly braces. Here is the correct code:


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!");
}
}
sleepCheck(10);
sleepCheck(5);
sleepCheck(8);


#2

Remove the last 2 lines where you're calling the function with 5 and 8 for the hours and see if that works.


#3

Hi or try to refresh the page..
@ghughes13 the () around the sring doesn't change anything..