Hi everybody:
i think i have my exercise just fine, but i dont know why i am getting an undefined in my screen a the end.
if you mind checking i would love to hear some feed back.
if (day === 'Monday'){
return 8;
}else if(day === 'Tuesday'){
return 8;
} else if (day === 'Wednesday'){
return 8;
} else if( day === 'Thursday'){
return 8;
} else if (day === 'Friday'){
return 8;
} else if ( day === 'Saturday'){
return 8;
} else if (day === 'Sunday'){
return 8;
}
}
const getActualSleepHours = () => 6+6+6+6+6+6+6 /*
const getIdealSleepHours = () =>{
let idealHours = 6;
return idealHours * 7;
}
const calculateSleeptDebt = () =>{
IdealSleeptHours = getIdealSleepHours();
actualSleepHours = getActualSleepHours();
if (actualSleepHours === IdealSleeptHours) {
console.log('You got the perfect amount of sleep');
}
else if( actualSleepHours > IdealSleeptHours){
console.log('You have' + (acutalSleepHours - idealSleepHour ) + 'more hours than you should');
}
else if(actualSleepHours < IdealSleeptHours){
console.log('You have '+ (IdealSleeptHours - actualSleepHours) + ' debt hours in your sleep');
}else{
console.log('Something is wrong here')
}
}
console.log(calculateSleeptDebt());```