12 Fuctions and if/else


#1



The Error says " SyntaxError: Unexpected token =" I dont know whats wrong with the code


 
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(numHours(10));
console.log(numHours(5));
console.log(numHours(8)):


#2

Hi here

if( numHours <== 8)

remove one = to <==
and here

console.log(numHours(8)): <== that

you should call the function sleepCheck() and not numHours() then you should remove the : at the end of the close ) of the last one


#3

Thanks alot , i didnt realize that