JavaScript Map Methods Flashcards

1
Q

set(key, val)

A

sets the value of a specific key in the map

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

Get(key)

A

Returns the value associated with a specified key in the map

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

has(key)

A

returns a Boolean indicating whether a map contains a key

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

delete(key)

A

removes the related key and value and returns Boolean indicating whether entry was deleted.

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

keys()

A

returns an array of keys

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

values()

A

returns an array of values

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

entries()

A

Returns a new iterator containing an array of key value pairs

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

size

A

returns the number of entries

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

clear()

A

Removes all the elements from the map

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