Help with Functions & if / else


// 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";


I am getting a error saying it is not getting returned?? Please help I have been on this for like a hour.


We don't use parenthesis in return statements. Remove them and let me know if that solved it.


no there is still something wrong with the ''else''


got the else fixed now it is saying that it is not returning


Does it say that nothing is being returned, or that the wrong thing is being returned?


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