Array Methods and Properties Flashcards

(46 cards)

1
Q

[ _ ]

What does the above do in Javascript?

A

creates a new array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

new Array()

What does the above do in Javascript?

A

creates a new array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

at()

What does the above do in Javascript?

A

returns an indexed element of an array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

concat()

What does the above do in Javascript?

A

joins arrays and returns an array with the joined arrays

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

constructer

What does the above do in Javascript?

A

returns the function that created the Array prototype

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

copyWithin()

What does the above do in Javascript?

A

Copies array elements within the array, to and from specific positions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

entries()

A

Returns a key/value pair Array Interation Object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

every()

What does the above do in Javascript?

A

checks if every element in an array pass a test

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

fill()

What does the above do in Javascript?

A

fills the element in an array with a static value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

filter()

What does the above do in Javascript?

A

creates a new array with every element in an array that pass a test

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

find()

What does the above do in Javascript?

A

returns the value of the first element in an array that pass a test

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

findIndex()

What does the above do in Javascript?

A

returns the index of the first element in an array that passes a test

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

findLast()

What does the above do in Javascript?

A

returns the value of the last element in an array that pass a test

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

fineLastIndex()

What does the above do in Javascript?

A

returns the index of the last element in an array that pass a test

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

flat()

What does the above do in Javascript?

A

concatenation sub-array elements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

flatMap()

What does the above do in Javascript?

A

maps all array elements and creates a new flat array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

forEach()

What does the above do in Javascript?

A

calls a function for each array element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

from()

What does the above do in Javascript?

A

creates an array from an object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

from()

What does the above do in Javascript?

A

creates an array from an object

20
Q

includes()

What does the above do in Javascript?

A

check if an array contains the specified element

21
Q

indexOf()

What does the above do in Javascript?

A

search the array for an element and returns its position

22
Q

isArray()

What does the above do in Javascript?

A

checks whether an object is an array

23
Q

join()

What does the above do in Javascript?

A

joins all element of an array into a string

24
Q

keys()

What does the above do in Javascript?

A

returns an Array Interation Object, containing the keys of the original array

25
lastIndexOf() What does the above do in Javascript?
search the array for an element, starting at the end, and returns its position
26
length What does the above do in Javascript?
sets or returns the number of elements in an array
27
map() What does the above do in Javascript?
creates a new array with the result of calling a function for each array element
28
of() What does the above do in Javascript?
creates an array from a number of arguements
29
pop() What does the above do in Javascript?
removes the last element of an array, and returns that element
30
prototype What does the above do in Javascript?
allows you to add properties to an Array object
31
push() What does the above do in Javascript?
adds new elements to the end of an array, and returns the new length
32
reduce() What does the above do in Javascript?
reduces the values of an array to a single value (going left-to-right)
33
reduceRight() What does the above do in Javascript?
reduces the values of an array to a single value (going right-to-left)
34
reverse() What does the above do in Javascript?
reverses the order of the elements in an array
35
shift() What does the above do in Javascript?
removes the first element of an array, and returns that element
36
slice() What does the above do in Javascript?
selects a part of an array, and returns the new array
37
some() What does the above do in Javascript?
checks if any of the elements in an array pass a test
38
sort() What does the above do in Javascript?
sorts the elements of an array
39
splice() What does the above do in Javascript?
adds or removes array elements
40
toReversed() What does the above do in Javascript?
reversed the order of array elements (to a new array)
41
toSorted() What does the above do in Javascript?
sorts the elements of an array (to a new array)
42
toSpliced() What does the above do in Javascript?
adds or removes array elements (to a new array)
43
toString() What does the above do in Javascript?
converts an array to a string, and returns the results
44
unshift() What does the above do in Javascript?
adds new elements to the beginning of an array, and returns the new length
45
valueOf() What does the above do in Javascript?
returns the primitive value of an array
46
with() What does the above do in Javascript?
Return a new array with updated elements