Array Methods and Properties Flashcards
(46 cards)
[ _ ]
What does the above do in Javascript?
creates a new array
new Array()
What does the above do in Javascript?
creates a new array
at()
What does the above do in Javascript?
returns an indexed element of an array
concat()
What does the above do in Javascript?
joins arrays and returns an array with the joined arrays
constructer
What does the above do in Javascript?
returns the function that created the Array prototype
copyWithin()
What does the above do in Javascript?
Copies array elements within the array, to and from specific positions
entries()
Returns a key/value pair Array Interation Object
every()
What does the above do in Javascript?
checks if every element in an array pass a test
fill()
What does the above do in Javascript?
fills the element in an array with a static value
filter()
What does the above do in Javascript?
creates a new array with every element in an array that pass a test
find()
What does the above do in Javascript?
returns the value of the first element in an array that pass a test
findIndex()
What does the above do in Javascript?
returns the index of the first element in an array that passes a test
findLast()
What does the above do in Javascript?
returns the value of the last element in an array that pass a test
fineLastIndex()
What does the above do in Javascript?
returns the index of the last element in an array that pass a test
flat()
What does the above do in Javascript?
concatenation sub-array elements
flatMap()
What does the above do in Javascript?
maps all array elements and creates a new flat array
forEach()
What does the above do in Javascript?
calls a function for each array element
from()
What does the above do in Javascript?
creates an array from an object
from()
What does the above do in Javascript?
creates an array from an object
includes()
What does the above do in Javascript?
check if an array contains the specified element
indexOf()
What does the above do in Javascript?
search the array for an element and returns its position
isArray()
What does the above do in Javascript?
checks whether an object is an array
join()
What does the above do in Javascript?
joins all element of an array into a string
keys()
What does the above do in Javascript?
returns an Array Interation Object, containing the keys of the original array