Skip to content

Commit b4fc631

Browse files
LuisLuis
authored andcommitted
mapped to create new arr of first & last names only
1 parent b35263d commit b4fc631

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎assignments/array-methods.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,9 @@ const runners = [
458458
// ==== Challenge 1: Use .forEach() ====
459459
// 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.
460460
let fullName = []
461+
runners.map((runner) => {
462+
fullName.push(`${runner.first_name} ${runner.last_name}`)
463+
})
461464
console.log(fullName)
462465

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

0 commit comments

Comments
 (0)