Assignment 5.1 first solution

updated with more appropriate lodash methods, extracted functions, and doc blocks
You're missing semi colons here and in other places, remember to lint your code.