javaScript chapter 1 lesson 12


I don't know what the heck is wrong with this code ! Can anyone help?

// 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! May be even too much!");
return ("Get some more shut eye!");



Two things:

  1. JavaScript return statements may be written inside parentheses, but shouldn't be. The strings are already delimited by quotes.

  2. Follow the instructions to the letter and use the exact phrases provided.


I got it. Thanks dude :wink:!


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