Stuck on the Sleep calculator project (step 7)

I’ve run into a brick wall at step 7, it asks to check if both getIdealSleepHours and getActualSleepHours work, and while getIdealSleepHours work, when i try check if getActualSleepHours work all I get is NaN and i don’t know what to do

If you add the following, what will the result be?

8 + undefined + 8 + 5 + 9 + 9 + 6
Hint

Answer: NaN

Look closely at your second call to getSleepHours:

getSleepHours('tueday') //which day of the week is that?

One spelling mistake causes the whole thing to come down lol, my bad I guess I didn’t see it, I’m sure it works if I spelled ‘tuesday’ right. I ended up deleted the whole thing and starting from scratch using switch statement instead cause that’s what I thought was wrong at first. Thank you for the help though

1 Like