You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 86ede43
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: assignments/array-methods.js
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -67,11 +67,18 @@ console.log(allCaps);
67
67
// ==== Challenge 3: Use .filter() ====
68
68
// The large shirts won't be available for the event due to an ordering issue. Get a list of runners with large sized shirts so they can choose a different size. Return an array named largeShirts that contains information about the runners that have a shirt size of L and log the result
69
69
letlargeShirts=[];
70
+
71
+
largeShirts=runners.filter(function(element){
72
+
returnelement.shirt_size==='L';
73
+
});
70
74
console.log(largeShirts);
71
75
72
76
// ==== Challenge 4: Use .reduce() ====
73
77
// 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
0 commit comments