Open Playground
JS ReferencesLesson #82

JavaScript Map Reference

[JavaScript Maps](jsmaps.asp)

Complete Map Reference

Revised July 2025

MethodDescription
new Map()Creates a new Map object
clear()Removes all the elements from a Map
delete()Removes a Map element specified by a key
entries()Returns an iterator object with the [key, value] pairs in a Map
forEach()Invokes a callback for each key/value pair in a Map
get()Gets the value for a key in a Map
groupBy()Groups object elements according to returned callback values
has()Returns true if a key exists in a Map
keys()Returns an iterator object with the keys in a Map
set()Sets the value for a key in a Map
sizeReturns the number of Map elements
values()Returns an iterator object of the values in a Map
Share

Learn More:

JavaScript Maps

JavaScript Map Methods

JavaScript Weak Maps

JavaScript Sets