/* When you have a data set that needs to be filtered by some criteria and you want to manipulate each remaining item as well ------------------------------ the results of all the students that wrote a particular paper, but you are only interested in the full names of all the students that had a mark of more than 80. */ const studentsData = [ { firstName: "Albert", lastName: "Einstein", score: 53 }, { firstName: "Charles", lastName: "Dickens" score: 84 }, { firstName: "Marilyn", lastName: "vos Savant", score: 99 }, ]; const smartestStudents = studentsData.reduce( (result, student) => { // do your filtering if (student.score <= 80) { return result; } // do your mapping return result.concat(`${student.firstName} ${student.lastName}`); }, [] );