I'm having issues with this function I'm writing.
function addToCart(item) {
let price = Math.floor(Math.random() * 100 + 1);
cart.push({ item: price });
console.log(`${item} has been added to your cart.`);
return cart;
};
When I look at what's stored in my cart array, it has "item: 32" for example, rather than the item name that's passed as a parameter.