Function & if / else


#1

// Write your function below.
// Don't forget to call your function!
var sleepCheck = function(numHours) {

    if(numHours >= 8) {
            return "You're grtting plenty of sleep! Maybe even to much!";
        }
    else {
            return "Get some more shut eye!";
        } 
}

console.log(sleepCheck(10));
console.log(sleepCheck(5));
console.log(sleepCheck(8));

i don't know what's wrong Please help me


#2

@microjumper37692,

Have a close look at

grtting


#3

thank you its worked


#4

how to fix the cod above?


#5

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