Adding Sleep Hours - Sleep Debt Calculator

Sleep Debt Calculator Question#4 Issue

Hello all! I’m having an issue with adding getActualSleepHours. Instead of the hours adding up, it looks like they are being placed next to each other:

8Error!66579

If someone can see what I’m missing, please let me know. Thank you!

so the second function call:

getSleepHours('tuesday')

results in 'error' string being returned, looking at the condition:

 else if (day === 'Tueday')

that is not how you spell tuesday, also string comparison are case sensitive.

because now you have a string and integers, JS does type coercion, but i think that is a matter for another day

lol! Thank you for your help!

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