liveBook · Manning

Array method

A JavaScript array method is a built-in operation associated with arrays for inspecting, processing, or transforming their elements.

How 2 Manning books explain it

The Well-Grounded Rubyist, Fourth Edition

The Array method is a Ruby top-level conversion method that returns an array representation of its argument.

How it is used
Converts an existing Ruby object into an array representation.
How deep it goes
Explains ordinary wrapping and object-defined to_a behavior, while stopping short of a complete conversion protocol reference.
Examples
Uses string conversion, a dynamically defined to_a method, and Array.try_convert with an object-defined to_ary method.
What you can do after
Apply it to obtain an array from an argument and observe how conversion methods affect the result.

Read how The Well-Grounded Rubyist, Fourth Edition explains array method →

Secrets of the JavaScript Ninja, Second Edition

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

How it is used
Use array methods to make collection handling more elegant, including adding and removing items.
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.

Read how Secrets of the JavaScript Ninja, Second Edition explains array method →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.