Lesson 12


#1

yo this is anoying...... i know that i'm close to solving this i just don't know how close

var sleepCheck = function(numHours){
    if (numHours === 8) {
        return("Your're getting plenty of sleep. Maybe even too much!");
        };
    if (numHours >= 9) {
        return("WAKE UP!! YOU'VE OVER SLEPT!!!!!")
        };    
    else {
        return("Get more shut eye!");
        };
};
    sleepCheck(10);
    sleepcheck(8);
    sleepCheck(5);

please tell me what's going on............ an error keeps saying something about my else statement and i don't quite understand


#2

No semicolons in conditional structures:


And the output messages should match those mentioned in the description so sry but the second if won't work.


#3

weird because i ran a code like this before and it worked perfectly...... hmmm....... well thanks for the information i shall look farther into my mistakes


#4

i looked farther into my mistakes.... and i seem to have encounter another problem
this time the the error is: ReferenceError: sleepcheck is not defined : what do i do to fix this???

var sleepCheck = function(numHours) {
if (numHours >= 8) {
return("Your're getting plenty of sleep. Maybe even too much!");
}
else {
return("Get more shut eye!");
}
};
sleepCheck(10);
sleepcheck(8);
sleepCheck(5);


#5

That's because you have c in lower case

where else you here you have c in uppercase