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 Array
Underscore.JS - Iterating Array
Underscore.JS has many easy to use methods which helps in iterating Arrays. This chapter discusses them in detail.
Underscore.JS provides various methods to iterate the Arrays as psted below −
Sr.No. | Method & Syntax |
---|---|
1 | _.first(array, [n]) |
2 | _.initial(array, [n]) |
3 | _.last(array, [n]) |
4 | _.rest(array, [index]) |
5 | _.indexOf(array, value, [isSorted]) |
6 | _.lastIndexOf(array, value, [fromIndex]) |
7 | _.sortedIndex(array, value, [iteratee], [context]) |
8 | _.findIndex(array, predicate, [context]) |
9 | _.findLastIndex(array, predicate, [context]) |