Skip to content

Commit b2b93ee

Browse files
committed
complete challenge 1 on arrays
1 parent 770541a commit b2b93ee

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"liveServer.settings.port": 5501
3+
}

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((runner) => {
59+
return {'first_name': runner.first_name, 'last_name': runner.last_name}
60+
});
5961
console.log(fullName);
6062

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

0 commit comments

Comments
 (0)