12. Functions & if / else - only prints once, but no error code


Codecademy lets me move on to the next lesson, but the console only prints "You're getting plenty of sleep! Maybe even too much!" once. I'm going to assume it printed for the first input of 10, but not the other two. Where did I mess up?

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


the console logs the value to the console by default, if you want to log more to the console use console.log()


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