Skip to content

Commit 1997009

Browse files
author
Gill Abada
committed
complete challenge 1 of array-methods.js.
1 parent 2db4387 commit 1997009

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

assignments/array-methods.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ const runners = [{"id":1,"first_name":"Charmain","last_name":"Seiler","email":"c
5555

5656
// ==== Challenge 1: Use .forEach() ====
5757
// The event director needs both the first and last names of each runner for their running bibs. Combine both the first and last names into a new array called fullName.
58-
let fullName = [];
58+
let fullName = runners.map(function(names) {
59+
return `${names.first_name} ${names.last_name}`;
60+
})
5961
console.log(fullName);
6062

6163
// ==== Challenge 2: Use .map() ====

0 commit comments

Comments
 (0)