Extended work with Meal Maker project. How actually should I use setter and getter

Wondering, how it is possible to create that code when all our array of food and prices will be secret inf with an underscore symbol before it. How do we create this whole code where _listOfFood will be secured information? (I can’t understand how we will be able to connect all these setters and getters together) Will be glad if someone advice me on how to handle it.

const menu = {
  _meal: "",
  _price: 0,
  set meal(mealToCheck) {
    if (typeof mealToCheck === "string") {
      return (this._meal = mealToCheck);
    } else {
      return "Incorrect data";
    }
  },
  set price(priceToCheck) {
    if (typeof priceToCheck === "number") {
      return (this._price = priceToCheck);
    } else {
      return "Incorrect data";
    }
  },
  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!";
    }
  },
};

let listOfFood = [
  { meal: "Coca-Cola", price: 2 },
  { meal: "Salad", price: 5 },
  { meal: "Icecream", price: 3 },
  { meal: "Cheeseburger", price: 8 },
  { meal: "French fries", price: 6 },
  { meal: "Surprise of the day", price: 10 },
];

let randomIndex = function () {
  return Math.floor(Math.random() * listOfFood.length);
};

let randomFoodIndex = randomIndex();
menu.meal = listOfFood[randomFoodIndex].meal;
menu.price = listOfFood[randomFoodIndex].price;

/* For checking if it works correctly
console.log(randomFoodIndex);
console.log(listOfFood[randomFoodIndex].meal);
*/

console.log(menu.todaysSpecial);

And also one little question:
Why when I write my function result into the square brackets directly won’t work? ( in menu.meal=…) However, the randomIndex function works well, but its result doesn’t chain with the food in form of index.
*I found that if I assign my randomIndex to the variable then it works well. But still can’t understand how it works.
**the old version of my code:

const menu = {
  _meal: '',
  _price: 0,
 
  set meal (mealToCheck) {
    if(typeof mealToCheck==='string') {
      return this._meal=mealToCheck;
    } else { return 'Incorrect data';
    }
  },

  set price (priceToCheck) {
    if(typeof priceToCheck === 'number') {
      return this._price = priceToCheck;
    } else {
      return 'Incorrect data';
    }
  },

  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!';
    }
  }
}

let food = ['Coca-Cola', 'Salad', 'Icecream', 'Cheeseburger', 'French fries', 'Surprise of the day'];

let randomIndex = function() {
    return Math.floor(Math.random()*food.length);
};

menu.meal = food[randomIndex()];
menu.price = 5;  // You may want to adjust this to get a random price based on the index

console.log(randomIndex());
console.log(menu.todaysSpecial);

Link: https://www.codecademy.com/journeys/full-stack-engineer/paths/fscj-22-building-interactive-websites/tracks/fscp-22-javascript-syntax-part-ii-c8ddbace-1463-4797-ae12-503c7b0f9552/modules/wdcp-22-learn-javascript-syntax-objects-42047fd1-bfb5-4b90-96a5-431acbee8013/projects/meal-maker