It says "Oops, try again. It looks like sleepCheck() isn't returning 'You're getting plenty of sleep! Maybe even too much!' when numHours is 10. Check your if / else syntax and whether you're using the correct comparison operator."

// Write your function below. 
// Don't forget to call your function!
function sleepCheck(numHours){
  if(numHours >=8){
    return "You're getting plenty of sleep! Maybe even too much";
  } else{
    return "Get some more shut eye!";


Read the Oops message carefully,
and compare their text with yours !!!!!


Hi Cathrine,

Why do you have a second ) after console.log(sleepCheck(10))?

Have you tried removing those?


1 ) is of the console.log()
1 ) is of the sleepCheck(10)


I wrote my code like that:
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!" ;

It allows me to move to the next, but it doesn't show me any result !


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