Sleep Debt Calculator Project Need Your Important Feedback For Improvement

const getSleepHours = (day) => {
switch (day) {
case “monday”:
return 8;
break;
case “tuesday”:
return 7;
break;
case “wednesday”:
return 7;
break;
case “thursday”:
return 8;
break;
case “friday”:
return 7;
break;
case “saturday”:
return 8;
break;
case “sunday”:
return 8;
break;
default:
return “Error”;
break;
}
};

const getActualSleepHours = () => 8 + 7 + 7 + 8 + 7 + 8 + 8;

const getIdealSleepHours = idealHours => idealHours * 7;

const calculateSleepDebt = () => {
const actualSleepHours = getActualSleepHours();
const idealSleepHours = getIdealSleepHours(8);
if (actualSleepHours === idealSleepHours) {
console.log(“You got the amount of sleep this week”);
} else if (actualSleepHours > idealSleepHours) {
console.log(
“You got the " +
(idealSleepHours - actualSleepHours) +
" hours more sleep than needed this week”
);
} else if (actualSleepHours < idealSleepHours) {
console.log(
“You got the " +
(idealSleepHours - actualSleepHours) +
" hours less sleep this week. Take some rest”
);
} else {
console.log(“Error!, something went wrong”);
}
};

calculateSleepDebt();