0% found this document useful (0 votes)
2 views

Array_Methods_walker

This document provides a comprehensive overview of various JavaScript array methods, detailing their functionality. Each method is briefly explained, including operations such as joining arrays, filtering elements, and modifying array contents. The methods covered include concat, copyWithin, entries, every, fill, filter, find, and many others.

Uploaded by

cricteam352
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Array_Methods_walker

This document provides a comprehensive overview of various JavaScript array methods, detailing their functionality. Each method is briefly explained, including operations such as joining arrays, filtering elements, and modifying array contents. The methods covered include concat, copyWithin, entries, every, fill, filter, find, and many others.

Uploaded by

cricteam352
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

JavaScript Array Methods

concat()

Joins two or more arrays.

copyWithin()

Copies part of an array to another location in the same array.

entries()

Returns an iterator object with key/value pairs.

every()

Checks if all array elements pass a test.

fill()

Fills array elements with a static value.

filter()

Creates a new array with all elements that pass a test.

find()

Returns the first element that satisfies a test.

findIndex()

Returns the index of the first element that satisfies a test.

findLast()

Finds the last element that satisfies a test.

findLastIndex()

Finds the last index of an element that satisfies a test.


flat()

Flattens a nested array.

flatMap()

Maps and flattens an array in one step.

forEach()

Calls a function for each array element.

from()

Creates an array from an object.

includes()

Checks if an array contains a specified element.

indexOf()

Searches for an element and returns its first index.

isArray()

Checks if a value is an array.

join()

Joins all array elements into a string.

keys()

Returns an iterator with the keys of the array.

lastIndexOf()

Searches for an element and returns its last index.

map()

Creates a new array with the results of calling a function on every element.
of()

Creates a new array with a specified number of arguments.

pop()

Removes the last element from an array.

push()

Adds new elements to the end of an array.

reduce()

Reduces the array to a single value.

reduceRight()

Reduces the array to a single value (from right to left).

reverse()

Reverses the order of the elements in an array.

shift()

Removes the first element of an array.

slice()

Selects a part of an array and returns a new array.

some()

Checks if at least one element in an array passes a test.

sort()

Sorts the elements of an array.

splice()

Adds/Removes elements from an array.


toLocaleString()

Returns a localized string representation of the array.

toString()

Returns a string representing the array.

unshift()

Adds new elements to the beginning of an array.

values()

Returns an iterator with the values of the array.

You might also like