JavaScript Array
25 functions
concatarr.concat(...arrays)Combines two or more strings and returns a new string.
everyarr.every(callbackFn)Tests whether all elements in the array pass the provided function.
fillarr.fill(value, start?, end?)Fills all elements in an array with a static value.
filterarr.filter(callbackFn)Creates a new array with all elements that pass the test function.
findarr.find(callbackFn)Returns the first element in the array that satisfies the testing function.
findIndexarr.findIndex(callbackFn)Returns the index of the first element satisfying the testing function.
flatarr.flat(depth?)Creates a new array with all sub-array elements concatenated recursively.
flatMaparr.flatMap(callbackFn)Maps each element using a function, then flattens the result by one level.
forEacharr.forEach(callbackFn)Executes a provided function once for each array element.
includesarr.includes(searchElement, fromIndex?)Determines whether a string contains a specified string.
indexOfarr.indexOf(searchElement, fromIndex?)Returns the index of the first occurrence of a specified value.
joinarr.join(separator?)Joins all elements of an array into a string.
maparr.map(callbackFn)Creates a new array with the results of calling a function on every element.
poparr.pop()Removes the last element from an array and returns that element.
pusharr.push(...elements)Adds elements to the end of an array and returns the new length.
reducearr.reduce(callbackFn, initialValue?)Executes a reducer function on each element, resulting in a single output value.
reversearr.reverse()Reverses an array in place.
shiftarr.shift()Removes the first element from an array and returns it.
slicearr.slice(start?, end?)Extracts a section of a string and returns it as a new string.
somearr.some(callbackFn)Tests whether at least one element passes the provided function.
sortarr.sort(compareFn?)Sorts the elements of an array in place.
splicearr.splice(start, deleteCount?, ...items)Changes the contents of an array by removing or replacing existing elements.
unshiftarr.unshift(...elements)Adds one or more elements to the beginning of an array.
Array.fromArray.from(arrayLike, mapFn?)Creates a new array from an array-like or iterable object.
Array.isArrayArray.isArray(value)Determines whether the passed value is an Array.
