Using Lodash library will make writing JS code so much easier. The good
definition is: "Applicative programming is the pattern of defining a function
that takes a function and then invokes that function for each element in a
collection/list".
It has a very nice documentation [https://lodash.com/docs]