javascript arrays Flashcards

1
Q

To add a value to an array from the back you can use?

A

.push()

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

after adding a value to an array through push method it also returns

A

the new length of the array.

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

what is a callback

A

A callback is a function definition passed as an argument to another function.

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

what is filters in js

A

it creates a new array out of the main array

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

what is .find ()

A

This is a method of picking one of the elements that comes first or matches the code.

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

what does The .find() method returns if the doesnt match the element you are looking for.

A

Undefined

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

what does The .find() method returns if the doesnt match the element you are looking for.

A

an empty array []

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

what Array map does

A

It changes information about an array

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

what does array .includes do

A

.includes check if an array contains a value and it returns a boolean

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

what does .includes() returns

A

A boolean

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

what does .join do

A

.join is used to join an element togetherwith something

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

anytime you want to change the state of an array you use

A

map()

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