What is wrong with my code?, it looks ok to me!, dumb mistake? Misspelling?



Error: There was a problem with your syntax.

// 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!";



function doesn't have a semi colon at the end rather a set of curly brackets and you run something in the function in this case the if/else statement..


var sleepCheck=function(numHours){

//run something in the function



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