Cómo hacer una función que devuelva el objeto que tiene el costo más bajo.
sandwitch = [ { 'type':"Italian", 'cost':7.69 , 'isVageterian':false }, { 'type':"Veggie", 'cost':5.50 , 'isVageterian':true }, { 'type':"Jackfruit", 'cost':8.50 , 'isVageterian':true }, ] sandwitch = [{ 'type': "Italian", 'cost': 7.69, 'isVageterian': false }, { 'type': "Veggie", 'cost': 5.50, 'isVageterian': true }, { 'type': "Jackfruit", 'cost': 8.50, 'isVageterian': true }, ] const lowest = sandwitch.reduce( (prev, curr) => prev.cost < curr.cost ? prev : curr ) alert(lowest.cost);