12. Functions & if / else


#1

Could somebody tell me what's wrong with my code below please:

var sleepCheck = function(numHours) {

if (numHours >= 8) {
return "You're getting plenty of sleep! May be even too much!";
}
else
{
return "get some more shut eye!";
}
};
console.log(sleepCheck(10));
console.log(sleepCheck(5));
console.log(sleepCheck(8));


#2

Maybe is one word that's probably what's stopping you from continuing


#3

Thanks. I changed it to one word and that still did not solve the problem. My code is actually identical to others but it still doesn't work. I actually copy and pasted at one point. This is getting quite frustrating.


#4

Hi inside your returns one first one you wrote May be istead of Maybe and one the other one get instead of Get so it should be like that

"You're getting plenty of sleep! Maybe even too much!"

Get some more shut eye!


#5

Thank's. That worked. But I do not understand why the error message made the impression that it was a syntax issue.


#6

you welcome... the error is because in this course they gave you some string so they expecte you to writte it identical.