Skip to content

Commit 63bd1c0

Browse files
committed
additions to array challenge 1
still not correct but wanted to submit most recent
1 parent db1c0d1 commit 63bd1c0

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

assignments/array-methods.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,24 @@ console.log(fullName);
6060
console.log("Hello World");
6161

6262

63+
for (i = 0; i < runners.length; i++){
64+
let fullName =[];
65+
fullName.push(runners[i].first_name);
66+
fullName.push(runners[i].last_name);
67+
console.log(fullName);
68+
}
69+
70+
71+
runners.forEach(function(first_name, last_name){
72+
let i = 0
73+
let fullName = [];
74+
fullName.push(runners[i]
75+
.first_name
76+
.last_name);
77+
i++;
78+
console.log(fullName);
79+
});
80+
6381
// ==== Challenge 2: Use .map() ====
6482
// 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
6583
let allCaps = [];

0 commit comments

Comments
 (0)