12/13 Functions & if/else


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

What am I doing wrong?


Try to remove semi colon from the third "}" and you might want to change the return to console.log.


The semicolon after if and else is a problem. See this link for an explanaition.

And you also lack () around your console.log. The syntax is: