Exact Change
See original GitHub issueChallenge Name
https://www.freecodecamp.com/challenges/exact-change
Issue Description
It’s impossible (so far as I know) to actually get the results requested in the instructions. For example:
checkCashRegister(3.26, 100.00, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.10], ["QUARTER", 4.25], ["ONE", 90.00], ["FIVE", 55.00], ["TEN", 20.00], ["TWENTY", 60.00], ["ONE HUNDRED", 100.00]]) should return [["TWENTY", 60.00], ["TEN", 20.00], ["FIVE", 15.00], ["ONE", 1.00], ["QUARTER", 0.50], ["DIME", 0.20], ["PENNY", 0.04]]
The output it’s looking for is actually:
[ [ 'TWENTY', 60 ], [ 'TEN', 20 ], [ 'FIVE', 15 ], [ 'ONE', 1 ], [ 'QUARTER', 0.5 ], [ 'DIME', 0.2 ], [ 'PENNY', .04 ] ]
If you attempt to format it with toFixed() the strings(which look more like the requested answers) will be rejected. `
Browser Information
- Browser Name, Version:
- Operating System:
- Mobile, Desktop, or Tablet:
Your Code
Screenshot
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:10 (9 by maintainers)
Top GitHub Comments
@damon-myers, awesome! Checkout our Contributing Guide and feel free to let us know in the Contributors chat room if you need any help!
I’ll get started on this and submit a PR shortly.