JS newbie – Setters

Hello! Long time ... 🫠

So why is this get function, when called at the end through console not printing Burger and 40?
The setters are called with these values before.
Part of codecademy js intro course

menu = {
  _meal: '',
  _price: 0,
  set meal(mealToCheck) {
    if (typeof mealToCheck === '') {
      return this._meal = mealToCheck;
    }
  },
  set price(priceToCheck) {
    if (typeof priceToCheck === 'number') {
      return this._price = priceToCheck;
    }
  },
  get todaysSpecial() {
    if (this._meal && this._price) {
      return "Today's Special is ${this._meal} for ${this._price}$."
    } else {
      return 'Meal or price was not set correctly!'
    }
  }
}

menu._meal = 'Burger';
menu._price = 40;

console.log(menu);
console.log(menu.todaysSpecial);
Was this page helpful?