Map
que se proporciona aquí como una envoltura alrededor de un object
JavaScript. Cree los siguientes métodos y operaciones en el objeto Map: add
acepta una key, value
par de key, value
para agregar al mapa. remove
acepta una clave y elimina la key, value
asociada key, value
par de key, value
get
acepta una key
y devuelve el value
almacenado has
acepta una key
y devuelve verdadero si existe la clave o falso si no lo hace. values
devuelve una matriz de todos los valores en el mapa size
devuelve el número de elementos en el mapa clear
vacía el mapa