12.Function If/else


What should I do ?

var sleepCheck = function(numHours) {
if ( sleepCheck >= 8 )
{ return "You're getting plenty of sleep! Maybe even too much!";}


{ return "Get some more shut eye!"; }


Line 4: replace sleepCheck with "numHours". You want to check if your parameter is >= 8
Line10: You don't need a ";"


fix the curly brackets


Oh I got it. Thank you ! :slight_smile:


Correct about the numHours part but the semicolon on Line 10 is fine, that belongs to the end of the function:

var name = value;

and in this case value is function(...){...}.

@gigarunner55716 What is wrong about them? A little bit unformatted but they all match as far as I can see.