Skip to content

Commit b4e593e

Browse files
committed
completed challenge 5 array methods js
1 parent 4758fd1 commit b4e593e

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

‎assignments/array-methods.js‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,21 @@ console.log(ticketPriceTotal);
108108
// Now that you have used .forEach(), .map(), .filter(), and .reduce(). I want you to think of potential problems you could solve given the data set and the 5k fun run theme. Try to create and then solve 3 unique problems using one or many of the array methods listed above.
109109

110110
// Problem 1
111+
// Return an array of runners with 3 Extra Large and Small shirt sizes
112+
113+
let threeXLS = []
114+
115+
function newCombination(combSizes){
116+
if (combSizes.shirt_size === '3XL' || combSizes.shirt_size === 'S')
117+
return threeXLS.push(combSizes);
118+
}
119+
120+
runners.filter(newCombination)
121+
console.log(threeXLS);
111122

112123
// Problem 2
124+
// Eliminate Runners with donations less than 100
125+
126+
113127

114128
// Problem 3

0 commit comments

Comments
 (0)