Function If/Else


12.Function & If/Else

Oops, try again. There was a problem with your syntax.

I am really confused. I’ve been searching through many different questions trying to find ways that i have been incorrect but I haven’t found anything wrong. I am genuinely confused and looking for an explanation. Not code. Thank you for your time anyway.

var sleepCheck = function (numHours) {
if (numHours >= 8) {
return “You’re getting plenty of sleep! Maybe even too much!”;
else (numHours < 8) {
return “Get some more shut eye!”;



An ELSE statement

else (numHours < 8) {

does NOT take a condition

else {


Thank you so much. It worked.