Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

What am I doing wrong?

Name: Anonymous 2016-12-18 12:34

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

sleepCheck(10);
sleepCheck(5);
sleepCheck(8);

Name: Anonymous 2016-12-31 23:25

var sleepMoreCallback = function() { return "Get some more shut eye!" }
var sleepLessCallback = function() { return "You're getting plenty of sleep! Maybe even too much!" }

var sleepCheckFunction = function(hoursInt, maxHoursInt, lessCallback, moreCallback) {
if(hoursInt >= maxHoursInt) {
moreCallback()
} else {
lessCallback()
}
}

sleepCheckFunction(10)
sleepCheckFunction(5)
sleepCheckFunction(8)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List