Cash Register - not passing test

checkCashRegister(19.5, 20, [["PENNY", 0.01], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 1], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]]) should return {status: "INSUFFICIENT_FUNDS", change: []}.

How can I get INSUFFICIENT_FUNDS if the change is 0.5 and I have 1.01 in cash-drawer ?

Because you do not have $.50 in change in the drawer. There is only one dollar and one penny. You can’t get up the dollar bill for change.

Thanks for the tip.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.