Getiing an error, even if i am using correct syntax. Please Help!


#1

var numHours;
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!";
}
};
//sleepCheck(10);
console.log(sleepCheck(10));
console.log(sleepCheck(5));
console.log(sleepCheck(8));


#2

I think you're meant to assign a prompt here.


#3

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