Lesson 12 Stuck


#1

Having some trouble identifying the problem.


#2

Any one coming to check my error was that I did not put my if statement in parenthesis.


#3

i have the same error but i don't know what to do

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


#4

i think you should put you the writing after the 'if' in brackets
maybe but i don't know so just try it


#5

You have some spaces in your variable declaration.


#6

i just got it and this is what i did

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

it worked still


#7

I don't know what you changed?


#8

i just refreshed it again


#9

Yep, that'd do it! :slightly_smiling: