What is wrong with this code


#1


// Write your function below.
// Don't forget to call your function!
var sleepCheck = function (sleepHours) {
if (sleepHours => 8) {
return "You're getting plenty of sleep! Maybe to much";
}
else {
return "Get some more shut eye!";
}
};
sleepCheck(10);
sleepCheck(5);
sleepCheck(8);


Replace this line with your code.


#2

I think it is because you haven't printed it into the console.
But also mind: sleepHours >= 8 instead of sleepHours => 8

console.log("Hello World!);
console.log(2+2);

Results in:

Hello World!
4

I bet you can figure out the rest yourself!


#3

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