In the following:
let items = [
{
itemName: "Effective Programming Habits",
type: "book",
price: 13.99
},
{
itemName: "Creation 3005",
type: "computer",
price: 299.99
},
{
itemName: "Finding Your Center",
type: "book",
price: 15.00
}
]
function myFunction(max, {price}) {
if (price > max) {
return price
}
return max
}
why does {price} return the price value for each object? why not item['price'] or item.price? Whre do you find the answer in the documentation? What do you look for?