Hey y’all. After completing the Make Meals and Team Stats projects I decided to go back and add some stuff to the Make Meals projects much like we did for the Team Stats project. I am new to this and it is probably crude, but take a look and let me know what y’all think:
```
const menu = {
_meal: [],
_price:[],
get meals(){
return this._meal;
},
get prices(){
return this._price;
},
// add a meal to specials
addMeal(newName, newMain,newSide, newDrink){
const meal = {
name: newName,
main: newMain,
side: newSide,
drink: newDrink
};
this._meal.push(meal);
},
// add a price to specials
addPrice(newMeal, newCost){
const price = {
name: newMeal,
cost: newCost
};
this._price.push(price);
}
}; // End of menu Object
// Standard Special Meals
menu._meal.push({
name: 'Pizza',
main: 'Pizza',
side: 'House Salad',
drink: 'Medium'
},
{
name: 'Chicken Fingers',
main: 'Chicken Fingers',
side: 'French Fries',
drink: 'Medium'
},
{
name: 'Cheeseburger',
main: 'Cheesburger',
side: 'French Fries',
drink: 'Medium'
});
// Standard Specials Price
menu._price.push({
name: 'Pizza',
cost: 9.99
},
{
name: 'Chicken Fingers',
cost: 5.99
},
{
name: 'Cheeseburger',
cost: 12.99
});
//add meal
menu.addMeal('Cesar Salad', 'Cesar Salad', 'None', 'Large');
menu.addPrice('Cesar Salad', 14.99);
console.log(menu.meals);
console.log(menu.prices);
```