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 - Iterating Collection
Underscore.JS - Iterating Collections
Underscore.JS has many easy to use methods which helps in iterating Collections. This chapter discusses them in detail.
Underscore.JS provides various methods to iterate the Collections as psted below −
Sr.No. | Method & Syntax |
---|---|
1 | _.each(pst, iteratee, [context]) |
2 | _.map(pst, iteratee, [context]) |
3 | _.reduce(pst, iteratee, [memo], [context]) |
4 | _.reduceRight(pst, iteratee, [memo], [context]) |
5 | _.find(pst, predicate, [context]) |
6 | _.filter(pst, predicate, [context]) |
7 | _.where(pst, properties) |
8 | _.findWhere(pst, properties) |
9 | _.reject(pst, predicate, [context]) |
10 | _.every(pst, [predicate], [context]) |
11 | _.some(pst, [predicate], [context]) |