Working with Arrays

In this chapter, we will cover the following recipes:

  • Using Array#find and Array#filter to find values in an array
  • Using Array#slice to get a subset of an array
  • Using Array#every and Array#some to test array values
  • Using Array.map to produce values
  • Using Array.reduce to transform data
  • Extracting array members with destructuring
  • Getting the head and tail of array using the rest operator
  • Combining arrays with the spread operator

Get ECMAScript Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.