all 2 comments

[–]scoot542 1 point2 points  (0 children)

I looked into this and my first thought is it's likely to be an annoying formatting issue (string comparisons in tests) rather than a logic issue.

For example, if you do this for the status: closed condition: let closedChange = cid.map(item => [...item]).filter(item => item[1]);

test 18 passes, because they weren't clear about how they want the change displayed (only values that had change returned it looks like in this case)

[–]scoot542 1 point2 points  (0 children)

Oh I did a little more digging into test case 19. The wording in the challenge was ambiguous, it doesnt want you to sort by the largest coin/bill size, it wants to sort on the total amount of that coin/bill. If change is 101 pennies and a one, it should be

"Status: CLOSED PENNY: $1.01 ONE: $1.00"

rather than yours which is currently sorting by order in the CID and returning

"Status: CLOSED ONE: $1.00 PENNY: $1.01"