question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Challenge 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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, Oct 31, 2016

@damon-myers, awesome! Checkout our Contributing Guide and feel free to let us know in the Contributors chat room if you need any help!

1reaction
damon-myerscommented, Oct 31, 2016

I’ll get started on this and submit a PR shortly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exact Change
Small press book publisher of 19th and 20th century experimental literature. Dada, Surrealism, and other avant-guard art-related works by authors such as ...
Read more >
Exact Change coin collecting software
Exact Change is the program of choice for coin and currency collectors of every level. Exact Change's extensive database dwarfs those of other...
Read more >
Exact Change Card Game - Educational Money Counting ...
OBJECTIVE: The goal is to play all of your cards first. You can discard cards by matching the color of the last card...
Read more >
Exact Change
Exact Change projects embody new perspectives in marketing, branding, and events, both analog and digital, that define and develop a brand and its ......
Read more >
exact change - Wiktionary
An amount of change whose combined monetary value exactly matches the value that a seller requires in exchange for goods or services. This...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found