Here's the code:
function populateTotal() {
// reduce transaction amounts to a single total value
let total = transactions.reduce((total, t) => {
return total + parseInt(t.value);
}, 0);
let totalEl = document.querySelector("#total");
totalEl.textContent = total;
}
Getting this error on the deployed app:
Uncaught (in promise) TypeError: transactions.reduce is not a function;