Lesson 12 function not repeating


#1


https://www.codecademy.com/courses/javascript-beginner-en-6LzGd/2/4?curriculum_id=506324b3a7dffd00020bf661#

My code is working fine (no error messages), however, I am wondering if my function is supposed to return 3 answers in the console? I have written sleepCheck() three times with the three different numbers as shown below but it only returns one answer. Should I not be getting three answers in the output?


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)
sleepCheck(5)
sleepCheck(8)


#2

no, why should you get 3 outputs? The codecademy console echos the last one (it just happens), but apart from that, nothing is instructed to log to the console, you can of course change this:

console.log(sleepCheck(10));

now, if you do this to all 3, you will 3 or 4 values, not sure, codecademy my echo the last one again