Underscore.js is an absolute boon for MVC front end coders. The abstractions that come with underscore work everywhere. All its functionalities are created and exposed through a single object, the underscore character ‘_’ having a global scope.
Some interesting functionalities provided by underscore are:
• Pluck: Extract specific properties or subsets of data.
• Map: Create an array from a collection and change the elements through a function.
• All: Check all values in a collection against a particular criteria
• Uniq: Remove duplicate elements
• Range: Create a list of numbers
• Intersection: Returns common elements from two arrays
• Keys and values: For when you need either only keys or only values
• Default: Create objects with sensible defaults
Clearly, Underscore is useful and has been used in some significant websites like LinkedIn, Huffington Post and Reddit. If you want you learn more about Underscore.js, following are some useful sources that can guide you:
Lynda.com has an amazing library of online video based courses. It provides a clear and in-depth learning for the members. The video tutorials are taught by industry experts and they provide a training for Underscore.js from beginner to advanced level. It consists of 22 video tutorials. The members are given unlimited access to every course. It is totally worth your time.
2. Getting Cozy With Underscore.js
This website is a good place to start for beginners. It give a good insight into what Underscore.js is all about and what are its capabilities. They illustrate the difference underscore can make by showing code snippets of some simple and concise examples. The language is fun and keeps you engaged throughout the tutorial. It is a good source for getting fundamental knowledge about the framework.
3. Underscore’s website
This is underscore’s official website for getting a deeper knowledge on Underscore.js. It explains the different functional programming helpers that the library offers with download links to each version of the library. It shows the functionalities of different functions on collections, objects, arrays, functions and utilities.
4. Learning Underscore.js
If you know of some other good sources to learn Underscore.js, please leave a comment.