What is wrong with my code pls?

Welcome to the Get Help category!

const getSleepHours = day => { switch(day){ case ‘monday’: return 8 break; case ‘tuesday’: return 7 break; case ‘wednesday’: return 9 break; case ‘thursday’: return 6 break; case ‘friday’: return 10 break; case ‘saturday’: return 6.5 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’); } const getIdealSleepHours = () => { let idealHours = 9; return idealHours * 7; } console.log(getSleepHours(‘wednesday’)); console.log(getIdealSleepHours()); const calculateSleepDebt = () => { const actualSleepHours = getActualSleepHours(); const idealSleepHours = getIdealSleepHours(); if(actualSleepHours === idealSleepHours){ console.log("user got the perfect amount of sleep"); } else if (actualSleepHours > idealSleepHours){ console.log(‘user got’ + (actualSleepHours - idealSleepHours) + ‘more sleep than needed’); } else if (actualSleepHours < idealSleepHours) { console.log(‘user got’ + (idealSleepHours - actualSleepHours) + ‘less sleep than needed. Get some rest’); } else{ console.log(“Error!something went wrong, check code.”); } } calculateSleepDebt();

A post was merged into an existing topic: What is wrong with my code pls?