Prototype: BalanceAccount starts at zero; balance, positive deposit returning balance, positive withdraw returning bool. Unaffordable withdrawal returns false; invalid amount raises unchanged.
Final: Bank.createAccount(nonemptyId) returns false on duplicate without resetting. balance returns number/null; deposit validates positive safe integer before missing-account result. transfer(requestId,source,target,amount) validates positive amount first; exact successful retry returns original [sourceBalance,targetBalance], conflict raises RangeError. Otherwise missing/same accounts or insufficient funds return null unchanged. Success moves amount and adds only to source outgoing. Failures reserve no ID. topSpenders(limit) returns fresh [id,outgoing] pairs ordered outgoing descending/ID, includes zero spenders; zero gives [], negative/invalid limit raises.
Every class is exported by name from exercise.mjs. Keep instances independent. Unless explicitly documented otherwise, input values have the stated collection/string types and do not contain null elements. Invalid calls preserve state; validate before mutation. Return fresh mutable snapshots unless stated otherwise.
Complete the starter code, then run the checks.
Results and errors will appear here.