JavaScript
function findLowestPrice(products) {
return products.reduce((lowest, product) =>
product.price < lowest.price ? product : lowest
);
}
const products = [{ price: 10 }, { price: 5 }, { price: 8 }];
console.log(findLowestPrice(products));