12/13 Codes are correct , but also through , but does not display the parameters results 5 and 8


#1

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


#2

Well it should not display the parameters but the strings after return. btw you only need var once. But what should happen is that the string is only printed for the last of the function calls as some kind of console echo. If you want to see all 3 you need to use console.log around them.