Map, reduce, and filter implemented for Arrays in Javascript.