Lesson 12 stuck


#1

Hi!, i don't understand what is wrong with my coding, thanks

// Write your function below.
// Don't forget to call your function!

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!"
}

sleepCheck=(10);
sleepCheck=(8);
sleepCheck=(5);


#2

When calling functions then you don't put an equals sign in between the function name and the parenthesis.

This is how you call a function:


functionName(parameters);

Hope this helped :slight_smile:


#3

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