HF RL Explorer

money arithmetic: fix bug

money arithmetic: fix bug: a task in smol-software-harbor (Harbor dataset). The till shows 0.30000000000000004 for total( '0.10', '0.20' ) : total() in src/money.js adds the prices as floating-point numbers. As its comment says, it must work in integer cents and return the amount formatted with…

The task

The till shows `0.30000000000000004` for `total(['0.10', '0.20'])`: `total()` in `src/money.js` adds the prices as floating-point numbers. As its comment says, it must work in integer cents and return the amount formatted with two decimals (use the helpers in the file). Run `node --test test/*.test.js`.

Part of efederici/smol-software-harbor.