Skip to content

Commit b18ac72

Browse files
removed return for foreach. fixed spacing issue for problem 2
1 parent b94724d commit b18ac72

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎assignments/array-methods.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const runners = [{"id":1,"first_name":"Charmain","last_name":"Seiler","email":"c
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.
5858
let fullName = [];
5959
runners.forEach(runner => {
60-
return fullName.push(`${runner.first_name} ${runner.last_name}`)});
60+
fullName.push(`${runner.first_name} ${runner.last_name}`)});
6161
/*runners.forEach(function(runner){
6262
fullName.push(`${runner.first_name} ${runner.last_name}`);
6363
});*/
@@ -96,7 +96,7 @@ console.log(highDoners);
9696
//{"id":50,"first_name":"Shell","last_name":"Baine","email":"sbaine1d@intel.com","shirt_size":"M","company_name":"Gabtype","donation":171}];
9797
// Problem 2
9898
let intelRunners = [];
99-
intelRunners = runners.filter( runner => {
99+
intelRunners = runners.filter(runner => {
100100
return runner.email.includes("intel");
101101
});
102102
console.log(intelRunners);

0 commit comments

Comments
 (0)