Underscore.JS Tutorial
Selected Reading
- Underscore.JS - Discussion
- Underscore.JS - Useful Resources
- Underscore.JS - Quick Guide
- Underscore.JS - Chaining
- Underscore.JS - Utilities
- Underscore.JS - Comparing Objects
- Underscore.JS - Updating Objects
- Underscore.JS - Mapping Objects
- Underscore.JS - Functions
- Underscore.JS - Processing Array
- Underscore.JS - Iterating Array
- Underscore.JS - Processing Collection
- Underscore.JS - Iterating Collection
- Underscore.JS - Environment Setup
- Underscore.JS - Overview
- Underscore.JS - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Underscore.JS - Processing Collection
Underscore.JS - Processing Collections
Underscore.JS has many easy to use methods which helps in processing Collections. This chapter discusses them in detail.
Underscore.JS provides various methods to process the Collections as psted below −
Sr.No. | Method & Syntax |
---|---|
1 | _.contains(pst, value, [fromIndex]) |
2 | _.invoke(pst, methodName, *arguments) |
3 | _.pluck(pst, propertyName) |
4 | _.max(pst, [iteratee], [context]) |
5 | _.min(pst, [iteratee], [context]) |
6 | _.sortBy(pst, iteratee, [context]) |
7 | _.groupBy(pst, iteratee, [context]) |
8 | _.indexBy(pst, iteratee, [context]) |
9 | _.countBy(pst, iteratee, [context]) |
10 | _.shuffle(pst) |
11 | _.sample(pst, [n]) |
12 | _.toArray(pst) |
13 | _.size(pst) |
14 | _.partition(pst, predicate) |
15 | _.compact(pst) |