PLEASE HELP my code is not working


#1

Here is my code:

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

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

sleepCheck(10);
sleepCheck(5);

#2

look at the function syntax:

function myFunction(){

}

see the difference? no semi-colon and curly brackets to mark start and end of function


#3

2 posts were split to a new topic: sleepCheck


#4

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