Array Methods Flashcards

1
Q

concat()

A

Joins two or more arrays, and returns a copy of the joined arrays

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

every()

A

Tests whether all elements in the array pass the test implemented by the provided function

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

filter()

A

Creates a new array with all elements that pass the test implemented by the provided function

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

foreach()

A

Executes a provided function once per array element

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

indexOf()

A

Searches array for an element, and returns element’s position

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

join()

A

Joins all elements of an array into a string

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

lastIndexOf()

A

Searches array for an element, starting at the end, and returns element’s position

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

map()

A

Creates a new array with the results of calling a provided function on every element in this array

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

pop()

A

Removes last element of an array, and returns that element

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

push()

A

Adds new element to the end of an array, and returns the new length

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

reverse()

A

Reverses the order of elements in an array

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

shift()

A

Removes the first element of an array, and returns that element

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

slice()

A

Selects part of an array, and returns the new array

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

sort()

A

Sorts the elements of an array

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

splice()

A

Adds/Removes elements from an array

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

toString()

A

Converts an array to a string, and returns result

17
Q

unShift()

A

Adds new elements to the beginning of an array, and returns the new length

18
Q

valueOf()

A

Returns the primitive value of an array