Challenge: Create an Amount
This challenge will test your skills of writing efficient code using functions in JavaScript.
We'll cover the following...
We'll cover the following...
Problem statement
Given an array of coins, write a function to compute the number of ways you can make that amount using those coins.
Note: There is an unlimited number of each coin type available.
Input
-
an
amount -
an array,
coins, containing different coins (in cents )
Output
- The number of ways to get the
amountusing thecoinsavailable
Sample input
amount = 4
coins = [1,2,3]
Here’s the amount all the coin values are given in cents ( ...