getActualSleepHours keeps saying undefined


#1

I am confused and don’t think that I’m doing this correctly. I tried looking at the hints to get some guidance and the console.log(getActualSleepHours()); keeps returning as undefined while getIdealHours returns 49. I’m not sure what I’m missing or doing incorrectly.:

const getSleepHours = day => {
  if (day === 'monday' || day === 'tuesday' || day === 'wednesday' || day === 'thursday' || day === 'friday' || day === 'saturday' || day === 'sunday') {
    return 8
  } else {
    return 'Sleep some more';
  }
};

const getActualSleepHours = () => {
  getSleepHours('Monday') +
  getSleepHours('Tuesday') +
  getSleepHours('Wednesday') +
  getSleepHours('Thursday') +
  getSleepHours('Friday') +
  getSleepHours('Saturday') +
  getSleepHours('Sunday')
}
  
const getIdealSleepHours = () => {
  const idealHours = 7;
  return idealHours * 7;
}
  
console.log(getActualSleepHours());
  
console.log(getIdealSleepHours());

#2

getActualSleepHours doesn’t return anything, so the “default”` of undefined is used


#3

Oh thank you! I wasn’t sure what was going on, but yo’re absolutely right!