Functions & if / else------how this code in not working?


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



It's only because you haven't written the exact output of "You're getting plenty of sleep! Maybe even too much!" Otherwise your function is working correctly. Also, you may want to rethink your file names when uploading pictures :grin: Cheers!


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