Hello I stuck on my sleep debt calculator

  switch (day) {
    case "monday":
      return 8
      break;
    case "tuesday":
      return 7
      break;
    case "wednesday":
      return 8
      break;
    case "thurday":
      return 9
      break;
    case "friday":
      return 6
      break;
    case "saturday":
      return 6
      break;
    case "sunday":
      return 7
      break;
    default:
      return "Error";
  }
};

const getActualSleepHours = () => {
  return (
    getSleepHours("monday") +
    getSleepHours("tuesday") +
    getSleepHours("wednesday") +
    getSleepHours("thursday") +
    getSleepHours("friday") +
    getSleepHours("saturday") +
    getSleepHours("sunday")
  );
};
console.log(getSleepHours("tuesday"));
console.log(getActualSleepHours());

I am getting stuck on the number 5 step not able to get total sleep hours instead
getting error message from defualt.

[/codebyte]

Hi! You have a typo in the case. Instead of “thursday” there is “thurday” :wink:

2 Likes

thank you so much for the help