Skip to content

Commit 6456a77

Browse files
committed
add challenge 2 array-methods
1 parent 685162a commit 6456a77

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

assignments/array-methods.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ console.log(fullName);
6565

6666
// ==== Challenge 2: Use .map() ====
6767
// 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
68-
let allCaps = [];
68+
//let allCaps = [];
69+
70+
const allCaps = runners.map(function(x){
71+
return x.first_name.toUpperCase();
72+
});
6973
console.log(allCaps);
7074

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

0 commit comments

Comments
 (0)