Question 5
Fill in property_name & definition, which can be used in Vuex Store to update the “best_food” state variable with the objects of those food items which have their calorific value less than 300.
const store = new Vuex.Store({ state:{ foods:[ {"name":"Sandwich", "calories":100}, {"name":"Pizza", "calories": 1250}, {"name":"Chips", "calories": 700} ], best_food: [] }, =property_name=:{ get_best_food: function(state) {
=========== definition ============
} },
})