JavaScript Array Methods | Programiz D11 Phase 2 Skip to main content

JavaScript Array Methods

In JavaScript, Array is a built-in global object that allows you to store multiple elements at once.

In this reference page, you will find all the Array methods and their properties. For example, the sort() method of an Array is used to sort all the elements of that array using default or custom sorting rules.

Returns the number of elements in an array

Returns the array in reverse order

Sorts the elements of an array in specific order

Returns array by filling elements with given value

Concatenates the array elements to a string

Returns the string representation of an array

Removes and returns the last array element

Removes and returns the first array element

Adds elements to end of array & returns its length

Adds elements to start of array and returns length

Returns array by merging given value and/or arrays

Returns an array by changing its elements in place

Returns the last index of occurrence of an element

Returns the first index of occurrence of element

Creates a new Array instance from given arguments

Returns a shallow copy of a portion of an array

Returns index of element that satisfies condition

Returns first element that satisfies a condition

Checks if a value exists in an array

Reduces array to single value from right to left

Reduces array to single value from left to right

Checks if the given value is a JavaScript Array

Returns array by filtering elements on given test

Returns array by mapping elements using given func

Executes the given function on array elements

Tests if any element passes given test function

Tests if all elements pass the given test function

Returns iterator containing key/value pair array

Returns an iterator containing keys of array items

Returns iterator containing values of array items

Creates a new Array from array-like object

Returns the constructor function for the array

Copies and overwrites elements within the array

Returns string representing the elements of array

Flattens the nested array to given depth

Returns new array by mapping and flattening array