Not working please help


#1

//not working please help

var sleepCheck = function(numHours) {
if (numHours >= 8) {
return "You're gettting 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));


12. Functions - SyntaxError: Unexpected token else
#2

There is a typo

return "You're gettting plenty of sleep! Maybe even too much!";

getting not get t ting


#3

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