Array Constructor
Array
Creates a new array.Static Methods
Array.isArray
Checks if a value is an array.Array.from
Creates an array from an iterable or array-like object.Instance Methods
at
Returns the element at an index (supports negative indexing).concat
Concatenates arrays.push
Adds elements to the end of an array.pop
Removes and returns the last element.shift
Removes and returns the first element.unshift
Adds elements to the beginning of an array.slice
Extracts a section of an array.splice
Changes array contents by removing/replacing/adding elements.indexOf
Returns the first index of an element.lastIndexOf
Returns the last index of an element.includes
Checks if array contains an element.reverse
Reverses the array in place.sort
Sorts the array in place.join
Joins array elements into a string.Iteration Methods
forEach
Executes a function for each element.map
Creates a new array with results of calling a function on every element.filter
Creates a new array with elements that pass a test.reduce
Reduces array to a single value.reduceRight
Reduces array from right to left.find
Returns the first element that satisfies a test.findIndex
Returns the index of the first element that satisfies a test.findLast
Returns the last element that satisfies a test.findLastIndex
Returns the index of the last element that satisfies a test.every
Tests if all elements pass a test.some
Tests if at least one element passes a test.flat
Flattens nested arrays.flatMap
Maps and flattens the result.fill
Fills array elements with a static value.copyWithin
Copies array elements within the array.Usage Examples
Data Processing
Array Manipulation
See Also
- Array Utilities - High-performance Porffor array operations
- Object Built-ins - Object methods
- Global Functions - Array type checking