Stuck on function last page revive question


#1

https://www.codecademy.com/courses/javascript-beginner-en-6LzGd/2/4?curriculum_id=506324b3a7dffd00020bf661#

whatever numHours I give it an error message considering give number as 10.But answer is displaying correctly right side of page

// 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(9);


#2

the string returned should be an exact match, copy paste it from the instructions


#3

Take a look at the first character in the if code block return. It should be a capital.

The program is checking that the string in the console matches what they gave as a message. Therefore, it has to match exactly.

Tip: For these, copy and paste the code and string that they give in the instructions. It helps to avoid case and string construction problems.

Cheers.


#4

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