liveBook · Manning

Array method

As explained in Secrets of the JavaScript Ninja, Second Edition

A method available on arrays for operations such as iteration, transformation, or querying.

An array method is an operation available on an array object. Because JavaScript arrays are objects, their methods can make collection-handling code more elegant. section 9.1

Built-in array methods include:

  • push, unshift, pop, shift, splice, forEach, map, every, some, find, filter, indexOf, lastIndexOf, findIndex, and reduce. section 9.1

How Secrets of the JavaScript Ninja, Second Edition covers it

How deep it goes
Introduces arrays as objects and surveys built-in methods without detailing each method’s mechanics.
Examples
Names push, splice, forEach, map, find, filter, and reduce among built-in methods.
What you can do after
Apply built-in array methods to handle collections more elegantly, including adding and removing items.
How it connects
Connects array methods to JavaScript arrays, object behavior, and collection handling.

Also explained in

Compare how 2 books explain array method →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Secrets of the JavaScript Ninja, Second Edition. The section links point to the parts of the book it draws on.