- Underscore.JS Tutorial
- Underscore.JS - Home
- Underscore.JS - Overview
- Underscore.JS - Environment Setup
- Underscore.JS - Iterating Collection
- Underscore.JS - Processing Collection
- Underscore.JS - Iterating Array
- Underscore.JS - Processing Array
- Underscore.JS - Functions
- Underscore.JS - Mapping Objects
- Underscore.JS - Updating Objects
- Underscore.JS - Comparing Objects
- Underscore.JS - Utilities
- Underscore.JS - Chaining
- Underscore.JS Useful Resources
- Underscore.JS - Quick Guide
- Underscore.JS - Useful Resources
- Underscore.JS - Discussion
Underscore.JS - Processing Array
Underscore.JS has many easy to use methods which helps in processing Arrays. This chapter discusses them in detail.
Underscore.JS provides various methods to process the Arrays as listed below −
Sr.No. | Method & Syntax |
---|---|
1 | flatten
_.flatten(array, [shallow]) |
2 | without
_.without(array, *values) |
3 | union
_.union(*arrays) |
4 | intersection
_.intersection(*arrays) |
5 | difference
_.difference(array, *others) |
6 | uniq
_.uniq(array, [isSorted], [iteratee]) |
7 | zip
_.zip(*arrays) |
8 | unzip
_.unzip(array) |
9 | object
_.object(list, [values]) |
10 | chunk
_.chunk(array, length) |
11 | range
_.range([start], stop, [step]) |
Advertisements