shopping cart discounts: fix bug
shopping cart discounts: fix bug: a task in smol-software-harbor (Harbor dataset). total() in src/cart.js applies coupons in the order they are given, but the rule (see the comment at the top of the file) is: all percentage coupons first, then the fixed-amount ones. Fix it so the result does not…
The task
`total()` in `src/cart.js` applies coupons in the order they are given, but the rule (see the comment at the top of the file) is: all percentage coupons first, then the fixed-amount ones. Fix it so the result does not depend on the order of the coupons array. Run `node --test test/*.test.js`.
Part of efederici/smol-software-harbor.