diff --git a/index.js b/index.js index 36136a0..73cbd50 100644 --- a/index.js +++ b/index.js @@ -39,6 +39,7 @@ result = people.reduce((acc, person) => { }, null); // find by name +people.reduce((acc, person) => person.name === 'Leigh' ? acc = person : acc = acc) result = people.reduce((acc, person) => { if (acc !== null) return acc;