Morgan Stanley Interview Question

Javascript filter, map, reduce functions