array methods Flashcards

1
Q

What statement could you use to triggers this result?

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

A

concat()

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

What statement could you use to triggers this result?

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

A

copyWithin()

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

What statement could you use to triggers this result?

Checks if every element in an array pass a test

A

every()

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

What statement could you use to triggers this result?

A

fill()

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

What statement could you use to triggers this result?

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

A

filter()

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

What statement could you use to triggers this result?

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

A

find()

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

What statement could you use to triggers this result?

Returns the index of the first element in an array that pass a test

A

findIndex()

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

What statement could you use to triggers this result?

Calls a function for each array element

A

forEach()

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

What statement could you use to triggers this result?

Search the array for an element and returns its position

A

indexOf()

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

What statement could you use to triggers this result?

Checks whether an object is an array

A

isArray()

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

What statement could you use to triggers this result?

Joins all elements of an array into a string

A

join()

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

What statement could you use to triggers this result?

Search the array for an element, starting at the end, and returns its position

A

lastIndexOf()

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

What statement could you use to triggers this result?

Creates a new array with the result of calling a function for each array element

A

map()

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

What statement could you use to triggers this result?

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

A

pop()

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

What statement could you use to triggers this result?

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

A

push()

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

What statement could you use to triggers this result?

Reduce the values of an array to a single value (going left-to-right)

A

reduce()

https://www.w3schools.com/jsref/jsref_reduce.asp

17
Q

What function could you use to triggers this result?

Reduce the values of an array to a single value (going right-to-left)

A

reduceRight()

18
Q

What function could you use to trigger this result?

Reverses the order of the elements in an array

A

reverse()

19
Q

What function could you use to trigger this result?

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

A

shift()

20
Q

What function could you use to trigger this result?

Selects a part of an array, and returns the new array

A

slice()

21
Q

What function could you use to trigger this result?

Checks if any of the elements in an array pass a test

A

some()

22
Q

What function could you use to trigger this result?

Sorts the elements of an array

A

sort()

23
Q

What function could you use to trigger this result?

Adds/Removes elements from an array

A

splice()

24
Q

What function could you use to trigger this result?

Converts an array to a string, and returns the result

A

toString()

25
Q

What function could you use to trigger this result?

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

A

unshift()

26
Q

What function could you use to trigger this result?

Returns the primitive value of an array

A

valueOf()