How can I check if the keys from pizzaRecipe
are in the walmart
object and calculate the values so I can get the price of what it will cost to shop the pizzaRecipe
ingredients in walmart
.
var walmart = {
cheese: 9,
corn: 2,
wine: 7,
parsley: 1,
coconut: 3,
tomato: 4,
potato: 6,
tomato: 2
};
var pizzaRecipe = {
cheese: 2,
tomato: 4,
parsley: 1
};
function costRecipeInStore(recipe, store) {};