Https://www.codecademy.com/courses/introduction-to-javascript/projects/sleep-debt-calculator

i keep getting 8 printed out as the result am i missing anything?

const getSleepHours = day => {


  if (day = 'monday'){
    return 8;
  }
  else if (day === 'tuesday'){
    return 7;
  }
  else if (day === 'wednesday'){
    return 6;
  }
  else if (day === 'thursday'){
    return 5;
  }
   else if (day === 'friday'){
    return 4;
  }
   else if (day === 'saturday'){
    return 9;
  }
   else if (day === 'sunday'){
    return 5;
  }
   else{
    return 'error';
  }

};
console.log(getSleepHours('tuesday'))

Hi and welcome to the forums!

The problem in in your first line of the if statement. You have accidentally written day = 'monday' which is assigning the value of day instead of checking it! The rest of your if else’s look fine so just change this and you should be good to go.