JavaScript Array Manipulation: A Guide to map, filter, and reduce