12. Functions and If / Else HELP PLEASE!


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

<In what way does your code behave incorrectly? Include ALL error messages.>

```

Replace this line with your code.

<do not remove the three backticks above>

#2

Please paste in your code + lesson + error…
We can only help you if you provide us with your code

Thanks


#3

what do you need help with for if/else statements?


#4

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!”;
}
};
console.log(sleepCheck(10));
console.log(sleepCheck(5));
console.log(sleepCheck(8));

I’ve tried so many different things, stuck on this for hours! I get all the right answers yet it says I didn’t for 5 hours


#5

please help I’m desprate


#6

Capital g for Get, most likely the problem, exercise is picky on correct grammar/punctuation


#7

Hallelujah!!! Thank you so much that took e hours and multiple tries!!! I even spent an hour looking at replies at other posts to help me! You’re the best!!!
Namaste


#8

that was all one big waste of time for a capital letter


#9

Thanks again Benjnev!!!