Functions & if/else

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/en/courses/javascript-beginner-en-6LzGd/2/4?curriculum_id=506324b3a7dffd00020bf661#

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
The function even though it is returning the string but an error message is displayed saying the function isn’t returning the string check the comparison operator and the if/else syntax

```

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!”;
}
};
console.log(sleepCheck(10));
console.log(sleepCheck(5));
console.log(sleepCheck(8));

<do not remove the three backticks above>

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

okkk… gotchaa…thankss :slight_smile:

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