checkCashRegister(19.5, 20, [["PENNY", 0.5], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 0], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]]) should return {status: "CLOSED", change: [["PENNY", 0.5], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 0], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]]}
I’m having trouble understanding this last test. Shouldn’t it only return
{status: "CLOSED",
change: [["PENNY", 0.5]]}
-
The last test is the only one where change is not sorted highest to lowest (unless I’m mistaken, instructions say to sort highest to lowest)
-
The only one showing coins/bills that are at $0