()
| 47 | } |
| 48 | |
| 49 | function calculateWealth() { |
| 50 | const wealth = data.reduce((acc, user) => (acc += user.money), 0); |
| 51 | |
| 52 | const wealthE1 = document.createElement("div"); |
| 53 | wealthE1.innerHTML = `<h3> Total Wealth: <strong>${formatMoney( |
| 54 | wealth |
| 55 | )}</strong></h3>`; |
| 56 | main.appendChild(wealthE1); |
| 57 | } |
| 58 | |
| 59 | function addData(obj) { |
| 60 | data.push(obj); |
nothing calls this directly
no test coverage detected