Warm up - Cover Coin Value
write a function that takes an array of coins as it’s first argument, and a string representing a coin as it’s second argument.
Options for the strings in the array, and the the string representing a coin are restricted to the strings: “penny", “nickel", “dime", “quarter", "half dollar", and “dollar".
This function will output how many of the second argument it would take to cover the total value of all of the coins in the array.
Tests:
coverValue(["penny", "nickel", "dime"], "quarter") // -> 1
coverValue(["penny", "nickel", "dime"], "nickel") // -> 4
coverValue(["penny", "nickel", "dime", "dime", "quarter"], "dime") // -> 6