The function Math.min gives the minimum of exactly two numbers. if we want to calculate the minimum or three numbers or four numbers we can get the minimum of a minimum.
If we want to find the minimum of more numbers there are other techniques.
There is a "three for the price of two" offer on books. If three books are purchased there is a discount equal to the cheapest.
Use the Math.min function to find the smallest of three numbers.
There is a "three for the price of two" offer on books. If three books are purchased there is a discount equal to the cheapest.
Find the cost to the customer of three books. That is, the price of the two most expensive books.