What can I cook?
You have potatoes and onions. What can you make? Let's build a recipe finder that searches a list of recipe objects by ingredient.
The data
const recipes = [
{ name: "Aloo tama", minutes: 40, ingredients: ["potato", "bamboo shoot", "beans"] },
{ name: "Aloo paratha", minutes: 30, ingredients: ["flour", "potato", "onion"] },
{ name: "Egg curry", minutes: 25, ingredients: ["egg", "onion", "tomato"] },
];
console.log(recipes[1].ingredients.includes("onion"));