Sleep debt calcuator

hello what is wrong with my code?

Hey @shhax, welcome to the forums!
Can you please send us the error message/problem and the link to the exercise?

Thanks!
Steven

4 Likes

Hey,

The getActualSleepHours function returns nothing.

const getActualSleepHours = () => /* 8+8+8+4+6+7+6;
   const getIdeaSleepHours=idealHours => idealHours* 7; */
 getSleepHours('Monday') +
  getSleepHours('Tuesday') +
  getSleepHours('Wednasday') +
  getSleepHours('Thursday') +
  getSleepHours('Friday') +
  getSleepHours('Saturday') +
  getSleepHours('Sunday') +
     
 console.log(getSleepHours('Friday'));
    }

Also it is missing a { at the end of the arrow notation. Should be:

const getActualSleepHours = () => {
 return getSleepHours('Monday') + getSleepHours('Tuesday') + getSleepHours('Wednesday') +   getSleepHours('Thursday') + getSleepHours('Friday') + getSleepHours('Saturday') +  getSleepHours('Sunday')
}

@stevencopeland link here

2 Likes