array methods

Built-in functions on every array, such as map, filter and forEach, that run a callback for each element.

In more detail

map returns a new array of transformed values, filter keeps the elements for which the callback returns true, and forEach just runs the callback. Passing a type predicate to filter narrows the resulting array type. Array.isArray checks whether a value is an array at all.

Related terms

Taught in

References