Functions & if / else ? whats wrong?!

<img src="//" width="690" height="431">indent preformatted text by 4 spaces




For the =Javascript Interpreter= a semi-colon-; is an End-of-Statement indicator.
Do NOT use a semi-colon-; in your IF ELSE Statement-structure.

if (condition ) {
   //IF code-block
else {
   //ELSE code-block


Your sleepCheck function

var sleepCheck = function( numHours ) {
     //Begin of FUNCTION-BODY
     // anonymous function takes 1 PARAMETER =numHours=
     //this =numHours= PARAMETER is used 
     //as a =local= VARIABLE
     //throughout the FUNCTION-BODY

     //your code, for instance an IF ELSE statement-structure

     //End of FUNCTION-BODY

As you call the sleepCheck =function=
and this sleepCheck =function= has 1 parameter numHours
you will have to provide 1 argument
in our case a number Value like 10

some quotes from the outer-world:

argument is the value/variable/reference being passed in,
parameter is the receiving variable used within the function/block**


"parameters" are called "formal parameters",
while "arguments" are called "actual parameters".**


// 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!";