Skip to content

Commit 5c19c54

Browse files
committed
completed challenge 2 of array-methods.js
1 parent 9bccd06 commit 5c19c54

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎assignments/array-methods.js‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,11 @@ let fullName = [];
6262
console.log(fullName);
6363

6464
runners.forEach(function(getNames){
65+
// if (getNames["first_name"] && getNames["last_name"]){
6566
let names = getNames.first_name + " " + getNames.last_name;
6667
fullName.push(names)
67-
console.log(names)
68+
// console.log(names)
69+
// }
6870
});
6971

7072
// ==== Challenge 2: Use .map() ====
@@ -73,6 +75,9 @@ console.log(fullName);
7375
let allCaps = [];
7476
console.log(allCaps);
7577

78+
const capAll = runners.map((capitalize) => {
79+
allCaps.push(capitalize.first_name.toUpperCase())
80+
});
7681
// ==== Challenge 3: Use .filter() ====
7782
// The large shirts won't be available for the event due to an ordering issue.
7883
//Get a list of runners with large sized shirts so they can choose a different size.

0 commit comments

Comments
 (0)