Sleep Debt Calculator Project

Hey, guys! I am having issues with step 5 on the sleep debt calculator project. I keep getting 23Error!7109 on the console. Can someone help me oput, please?

i can’t see all the cases, but very likely you have a typo in either one of the cases, or the argument you pass while calling the function.

you could add a console.log() to the default case to see which case gives the error

Oh, that could be it! This is another snip of the cases.

You were right about the typo! Caught it just now. Thanks!

1 Like

which is why just returning Error isn’t very informative. Doing something like:

return `${day} not a valid day`;

is so much more informative.

1 Like

Noted! I will put that into practice from now on. :slight_smile:

1 Like