Lodash library usage examples

Lodash library usage with JavaScript

Using lodash library

Usign lodash library makes you not reinvent weel when writing JS code. 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”

A very neat example you can find at

http://4waisenkinder.de/blog/2013/10/12/you-use-underscore-slash-lo-dash/

Also it has very nice documentation

https://lodash.com/docs

Example:

var users = [
  { 'user': 'barney', 'age': 36 },
  { 'user': 'fred',   'age': 40 }
];
_.pluck(users, 'user');
// → ['barney', 'fred']