The bookkeeper’s month-end script now runs in JavaScript, next to the roastery’s order dashboard. For October’s export, invoices.js prints the same fourteen lines as invoices.py, and every weight, cent, share, and nineteen-digit order number agrees with Python’s.
Along the way, you’ve learned to:
- Add up measured values exactly in whole units that stay safe integers, and compare computed floats with a tolerance from the data
- Count money in integer cents where Python used
Decimal - Keep big IDs exact as text with a
JSON.parse()reviver, and check that an integer is still exact withNumber.isSafeInteger() - Do exact big-integer arithmetic with BigInt
- Check results with
Number.isFinite()before they reach a report line - Make
Intl.NumberFormatround exact halves and add signs and labels to numbers as Python’s format specs do, in a reader’s locale
Each of those skills replaced a Python habit that didn’t carry over.