Answer by Hero Qu for slice() Methods/Javascript
The problem with your code is that it subtracts pennies as fractional values, so when you do arithmetics with number of pennies you might end up with non-rounded pennies, I mean you can get 0.0799999...
View Articleslice() Methods/Javascript
function checkCashRegister(price, cash, cid) { let amount = {"ONE HUNDRED": 100,"TWENTY": 20,"TEN": 10,"FIVE": 5,"ONE": 1,"QUARTER": 0.25,"DIME": 0.1,"NICKEL": 0.05,"PENNY": 0.01 } let copy =...
View Article
More Pages to Explore .....