12.Functions If/Else


#1


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

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!" }
        
    else
   { return "Get some more shut eye!" }};
        
        sleepCheck(10);


#2

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:


#3

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:


#4

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