Shared Flashcard Set

Details

Array Methods
Methods that can be performed on arrays in Javascript
32
Computer Science
Professional
11/01/2018

Additional Computer Science Flashcards

 


 

Cards

Term
from
Definition
shallow copies an array
Term
of
Definition
defines an array where any arguments are treated as elements, not length
Term
concat
Definition
merges with another array and returns that as a new array.
Term
copyWithin
Definition
shallow copies part of an array and replaces another part of the array with it.
Term
entries
Definition
returns an Array Iterator containing the array's elements that can be traversed using next().value or for...of
Term
every
Definition
returns whether all elements in the array pass a condition specified by a function
Term
fill
Definition
replaces some elements in the array with the same, specified value
Term
filter
Definition
returns an array with only the elements that pass a condition specified by a function
Term
find
Definition
returns the value of the first element that passes a condition specified by a function
Term
findIndex
Definition
returns the index of the first element that passes a condition specified by a function
Term
forEach
Definition
performs a specified function on every element
Term
includes
Definition
returns whether a given value is found in an array
Term
indexOf
Definition
returns the index of the first element that matches a given value or -1 if not found
Term
join
Definition
concatenates the elements of the array into a string with a given separator between each value
Term
keys
Definition
returns an Array Iterator that contains string indices for all defined elements that can be traversed using next().value or for...of
Term
lastIndexOf
Definition
returns the index of the last element that matches a given value or -1 if not found
Term
map
Definition
returns a new array with the results of performing a specified function on each element
Term
pop
Definition
removes and then returns the last element of an array
Term
push
Definition
adds element(s) to the end of an array and returns the new length
Term
reduce
Definition
performs on every element from left to right a specified function, which results in a single returned value
Term
reduceRight
Definition
performs on every element from right to left a specified function, which results in a single returned value
Term
reverse
Definition
reorders elements in the array backwards
Term
shift
Definition
removes and then returns the first element of an array
Term
slice
Definition
returns a new array containing all the elements from one index inclusive to another index exclusive
Term
some
Definition
returns whether any elements in the array pass a condition specified by a function
Term
sort
Definition
reorders elements in the array by the specified function or by unicode value
Term
splice
Definition
Inserts the given value at the given index and removes the given number of elements that had already been there
Term
toLocaleString
Definition
localizes each element by its type and the given configuration and concatenates them into a string
Term
toString
Definition
Returns the the array as a string with brackets and commas between each element
Term
unshift
Definition
inserts the given elements at the start of the array and returns the new length
Term
values
Definition
returns an Array Iterator containing the values of all the elements, which can be traversed using next().value or for...of
Term
[Symbol.species]
Definition
returns the array constructer
Supporting users have an ad free experience!