JavaScript Map Methods Flashcards
1
Q
set(key, val)
A
sets the value of a specific key in the map
2
Q
Get(key)
A
Returns the value associated with a specified key in the map
3
Q
has(key)
A
returns a Boolean indicating whether a map contains a key
4
Q
delete(key)
A
removes the related key and value and returns Boolean indicating whether entry was deleted.
5
Q
keys()
A
returns an array of keys
6
Q
values()
A
returns an array of values
7
Q
entries()
A
Returns a new iterator containing an array of key value pairs
8
Q
size
A
returns the number of entries
9
Q
clear()
A
Removes all the elements from the map