Javascript Reduce and Map In Depth. Explained.