Introduction to Functions in JS #12


#1

Hi, guys! Long time no see) can anybody help me?
// 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! Maybe even too much!";
};
else {
return ("Get some more shut eye!");
};
sleepCheck(10);
sleepCheck(5);
sleepCheck(8);

thank you anyway


#2

You function opening curly bracket:

var sleepCheck = function(numHours) { <- this one

doesn't have a matching closing bracket. No need for semi-colons after closing curly brackets from if and else statements