JavaScript Algorithms and Data Structures Projects: Cash Register

JavaScript Algorithms and Data Structures Projects: Cash Register
0.0 0

#1

Could somebody explain to me what’s up with that number?
You have 60, twenty dollar bills, I get that, but how about the penny? 1.01? Nickel? 2.05?
I’m not so familiar with US currency.


#2

image

You are misunderstanding the arrays. ["TWENTY", 60] doesn’t mean that you have 60 twenties, it means that you have $60 in twenties (you have 3 twenties, each one worth $20). Similarly, ["PENNY", 1.01] means that you have $1.01 in pennies. A penny is worth $0.01, so that means you have 101 pennies. The table included in the challenge description tells you the currency values.


#3

thankuuu, I’ll see if I can solve it now, wish me luck :slight_smile: