Skip to content

Commit 4c7d211

Browse files
committed
completed array-methods challenge 2
1 parent 339cb39 commit 4c7d211

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

assignments/array-methods.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ runnersCopy.forEach(item => fullName.push(`${item.first_name} ${item.last_name}`
6363
// ==== Challenge 2: Use .map() ====
6464
// The event director needs to have all the runner's first names converted to uppercase because the director BECAME DRUNK WITH POWER. Convert each first name into all caps and log the result
6565
let allCaps = [];
66+
allCaps = runners.map(each => ({
67+
...each,
68+
first_name: each.first_name.toUpperCase()
69+
}));
6670
console.log(allCaps);
6771

6872
// ==== Challenge 3: Use .filter() ====

0 commit comments

Comments
 (0)