array methods Flashcards
What statement could you use to triggers this result?
Joins two or more arrays, and returns a copy of the joined arrays
concat()
What statement could you use to triggers this result?
Copies array elements within the array, to and from specified positions
copyWithin()
What statement could you use to triggers this result?
Checks if every element in an array pass a test
every()
What statement could you use to triggers this result?
fill()
What statement could you use to triggers this result?
Creates a new array with every element in an array that pass a test
filter()
What statement could you use to triggers this result?
Returns the value of the first element in an array that pass a test
find()
What statement could you use to triggers this result?
Returns the index of the first element in an array that pass a test
findIndex()
What statement could you use to triggers this result?
Calls a function for each array element
forEach()
What statement could you use to triggers this result?
Search the array for an element and returns its position
indexOf()
What statement could you use to triggers this result?
Checks whether an object is an array
isArray()
What statement could you use to triggers this result?
Joins all elements of an array into a string
join()
What statement could you use to triggers this result?
Search the array for an element, starting at the end, and returns its position
lastIndexOf()
What statement could you use to triggers this result?
Creates a new array with the result of calling a function for each array element
map()
What statement could you use to triggers this result?
Removes the last element of an array, and returns that element
pop()
What statement could you use to triggers this result?
Adds new elements to the end of an array, and returns the new length
push()
What statement could you use to triggers this result?
Reduce the values of an array to a single value (going left-to-right)
reduce()
https://www.w3schools.com/jsref/jsref_reduce.asp
What function could you use to triggers this result?
Reduce the values of an array to a single value (going right-to-left)
reduceRight()
What function could you use to trigger this result?
Reverses the order of the elements in an array
reverse()
What function could you use to trigger this result?
Removes the first element of an array, and returns that element
shift()
What function could you use to trigger this result?
Selects a part of an array, and returns the new array
slice()
What function could you use to trigger this result?
Checks if any of the elements in an array pass a test
some()
What function could you use to trigger this result?
Sorts the elements of an array
sort()
What function could you use to trigger this result?
Adds/Removes elements from an array
splice()
What function could you use to trigger this result?
Converts an array to a string, and returns the result
toString()
What function could you use to trigger this result?
Adds new elements to the beginning of an array, and returns the new length
unshift()
What function could you use to trigger this result?
Returns the primitive value of an array
valueOf()