...
/Solution Review: Make Maximum Donuts
Solution Review: Make Maximum Donuts
This lesson will explain the solution to the problem in the previous lesson.
We'll cover the following...
We'll cover the following...
Solution #
Explanation #
The maxDonuts function takes two objects as parameters; the recipe and the quantity of ingredients available.
To make the donuts, we need all the ingredients of the recipe given. In the above scenario, we need the following:
{ flour: 2, sugar: 40, butter: 20 }
To make a whole donut, we will need either the exact amount of ingredients mentioned in the recipe or greater. We can’t make a whole donut if the amount of even a single ingredient is less than ...