12.Functions If/Else



Tried using a different browser ,refreshing and resetting code. Have no idea what I'm doing wrong, please help me :frowning:

// Write your function below. 
// Don't forget to call your function!

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


A couple tips .

~ Put semi colons ; after your return statements.
~ Check the spelling. geting should be getting

The queston also asks you to

Call the function with 5 hours of sleep.
Call the function with 8 hours of sleep.

Let me know if that worked/ helped :slight_smile:


yeah I figured it out actually haha I totally just needed to do a spellcheck :slight_smile: but yes this def would have helped had I not realized those things before hand. Thank you for your help :slight_smile:


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