JS Map Usage

statement:

var map = new Map()

method:

clear
    Removes all elements from the map.
delete
    Removes the specified element from the map.
forEach
    perform the specified operation on the map each element.
get
    Returns the specified element map.
has
    if the map contains the specified elements, it returns true.
set
    to add a new element to the map.
toString
    Returns a string representation of the map.
valueOf
    Returns the object's original value.

Guess you like

Origin blog.csdn.net/qq_34579060/article/details/89476541