Tell us what’s happening:
Im on the cash register js challenge (the last one). I managed to pass everything but one -
checkCashRegister(3.26, 100, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.1], ["QUARTER", 4.25], ["ONE", 90], ["FIVE", 55], ["TEN", 20], ["TWENTY", 60], ["ONE HUNDRED", 100]])
should return{status: "OPEN", change: [["TWENTY", 60], ["TEN", 20], ["FIVE", 15], ["ONE", 1], ["QUARTER", 0.5], ["DIME", 0.2], ["PENNY", 0.04]]}
For some reason the decimal integer increases. Like for example -
Ive put a comment at the area of concern.
[Note: I know the code is messy so please ignore it ]
The code is kinda big … so the fcc box didnt allow me to post the full code here, so i had to make a codepen project -
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36 Edg/97.0.1072.62
Challenge: Cash Register
Link to the challenge: