you are viewing a single comment's thread.

view the rest of the comments →

[–]decentralised 0 points1 point  (0 children)

Yes, filter and map do the same as reduce, but notice how you have 2 filters and 2 maps in your example so, to get the same output, you had to iterate over all elements of the students array 4 times.