I dont know when i call my function it shows an error || SleepDeptCalculator

You must select a tag to post in this category. Please find the tag relating to the section of the course you are on E.g. loops, learn-compatibility

When you ask a question, don’t forget to include a link to the exercise or project you’re dealing with!

If you want to have the best chances of getting a useful answer quickly, make sure you follow our guidelines about how to ask a good question. That way you’ll be helping everyone – helping people to answer your question and helping others who are stuck to find the question and answer! :slight_smile:

I get the following error:

ReferenceError: calculateSleepDept is not defined

If I then compare the call:

calculateSleepDept();

with the definition:

const calculateSleepDebt = () => {

I see a problem/typo.

1 Like

Thank you for giving your time and looking into the code! I really appreciate that.
But after comparing the declaration of function with the function call I do not see any typo/mistake.
Please help me with this.
Thanks in advance.

dept vs debt? I know the p and b look somewhat similar, but they are not the same.

1 Like

oooo right thanks what a fool i am…i feel embarrased now…but thanks brother

1 Like