We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0154641 commit d6e7ed5Copy full SHA for d6e7ed5
assignments/array-methods.js
@@ -84,7 +84,11 @@ console.log(largeShirts);
84
85
// ==== Challenge 4: Use .reduce() ====
86
// The donations need to be tallied up and reported for tax purposes. Add up all the donations into a ticketPriceTotal array and log the result
87
-let ticketPriceTotal = [];
+// let ticketPriceTotal = [];
88
+
89
+const ticketPriceTotal = runners.reduce(function (total, amount) {
90
+ return total + amount.donation
91
+},0);
92
console.log(ticketPriceTotal);
93
94
// ==== Challenge 5: Be Creative ====
0 commit comments