TypeScript · easy
The ledger is joining an invoice id to an amount instead of doing arithmetic. "1042" + 10 becomes "104210", which could send payment to the wrong invoice. An id must be numeric before money math begins.
Return the invoice number plus the delta, not a concatenated string. "1042" plus 10 returns the number 1052; an invalid id such as "nope" returns null.
workspace/
└── src/
└── ledger.ts (adds strings like a drunk Excel)With sharpen installed, this command opens exactly this challenge in your local arena:
sharpen 19
First time? The full install is right below.
npm install -g @juanwmedia/sharpen sharpen 19 npx @juanwmedia/sharpen 19 sharpen update