Lo-Dash Essentials
上QQ阅读APP看书,第一时间看更新

Chapter 1. Working with Arrays and Collections

Lo-Dash offers a wide variety of functions that operate on arrays and collections. This generally involves iterating over the collection in one form or another. Lo-Dash helps make iterative behavior easy to implement, including searching for data, as well as building new data structures.

Collections are at the heart of applicative programming. This is where we will successively apply functions to each element in the collection. This chapter introduces the concept of the collection, something Lo-Dash code uses extensively.

In this chapter, we will cover the following topics:

  • Iterating over collections
  • Sorting data
  • Searching for data
  • Slicing collections into smaller pieces
  • Transforming collections