Can someone please tell me what is wring with my code?


#1


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);
console.log(sleepCheck);


#2

You're so close. You call sleepCheck(10) which runs your function and returns a result. However that result is immediately discarded because nothing uses it. In your last line you send a reference to your function to console.log but don't call it.


#3

Thank you. 5 minutes after i posted this I figured it out!


#4

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