You are creating a coffee app that lists certain info about this set of coffee data
let coffees = [
{ roaster: "Sweet Bloom", flavorProfile: ["cocoa nibs", "praline", "blackberry"] cost: 14},
{ roaster: "Unravel Coffee", flavorProfile: ["dried peaches", "apricot", "tangerine cream"], cost: 15 },
{ roaster: "Middle State", flavorProfile: ["blackberry", "chocolate", "jackfruit"], cost: 16 },
{ roaster: "Copper Door", flavorProfile: ["blackberry", "honey", "blacktea"], cost: 15 },
{ roaster: "Jubilee", flavorProfile: ["honeysuckle", "vanilla", "grapefruit"], cost: 15 }
]
Write a function that returns me an array of all the roasters that have "blackberry"
in the flavor profile.
So `["Sweet Bloom", "Middle State", "Copper Door"]
Refactor your function to get me the total cost of all the coffee that has "blackberry"
as part of the flavor profile.
The value returned should be 45
Refactor your function to return me a list of all the flavor profiles that have "blackberry"
.
The value returned should be ["cocoa nibs", "praline", "blackberry", "blackberry", "chocolate", "jackfruit", "blackberry", "honey", "blacktea"]