Javascript Array Functions Flashcards
Array.prototype.at()
Returns the array item at the given index. Accepts negative integers, which count back from the last item.
Array.prototype.concat()
Returns a new array that is this array joined with other array(s) and/or value(s).
Array.prototype.copyWithin()
Copies a sequence of array elements within the array.
Array.prototype.entries()
Returns a new Array Iterator object that contains the key/value pairs for each index in the array.
Array.prototype.every()
Returns true if every element in this array satisfies the testing function.
Array.prototype.fill()
Fills all the elements of an array from a start index to an end index with a static value.
Array.prototype.filter()
Returns a new array containing all elements of the calling array for which the provided filtering function returns true.
Array.prototype.find()
Returns the FIRST found element in the array, if some element in the array satisfies the testing function, or undefined if not found.
Array.prototype.findIndex()
Returns the found index in the array, if an element in the array satisfies the testing function, or -1 if not found.
Array.prototype.forEach()
Calls a function for each element in the array.
Array.prototype.includes()
Determines whether the array contains a value, returning true or false as appropriate.
Array.prototype.indexOf()
Returns the first (least) index of an element within the array equal to an element, or -1 if none is found.
Array.prototype.join()
Joins all elements of an array into a string.
Array.prototype.keys()
Returns a new Array Iterator that contains the keys for each index in the array.
Array.prototype.lastIndexOf()
Returns the last (greatest) index of an element within the array equal to an element, or -1 if none is found.