The link to the page is: https://www.educative.io/courses/the-complete-javascript-course-build-a-real-world-app-from-scratch/qVlyoEpxYEk
The final line of the solution is:
const result = filter(filter(students,femaleList),avgGrade);
I understand this part: filter(students,femaleList).
But why are we applying filter() again with avgGrade? Isn’t filter() supposed to only return array items that meet the given criteria given in the function? Here we’re trying to apply avgGrade to all students; why are we using filter() instead of map(), and why does using filter(students,femaleList).map(avgGrade) not work?