coderef

Map (initial support)Baseline · Widely available

Map objects hold key-value pairs and remember the original insertion order of the keys.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Jul 29, 2015. Widely available since Jan 29, 2018.

Browser support

DesktopChrome
1–37Not supported
38+Supportedsince Oct 7, 2014
Current: 155
Edge
12+Supportedsince Jul 29, 2015
Current: 154
Firefox
1–12Not supported
13+Supportedsince Jun 5, 2012
Current: 157
Safari
1–7Not supported
8+Supportedsince Oct 16, 2014
Current: 27
MobileChrome Android
18–37Not supported
38+Supportedsince Oct 8, 2014
Current: 155
Firefox Android
4–10Not supported
14+Supportedsince Jun 26, 2012
Current: 157
Safari iOS
1–7Not supported
8+Supportedsince Sep 17, 2014
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN: Map.

Feature detection

JS · check before using
if (typeof Map !== "undefined") {
  // Map is available
}

Sub-features

Support for each part of the feature (17). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
Map381213838148
Map.@@iterator38123610383610
Map.@@species51134110514110
Map.Map381213838148
Map.Map.iterable_allowed381213938149
Map.Map.null_allowed381237938379
Map.clear381219838198
Map.delete381213838148
Map.entries381220838208
Map.forEach381225838258
Map.get381213838148
Map.has381213838148
Map.key_equality_for_zeros381229938299
Map.keys381220838208
Map.set381213838148
Map.size381219838198
Map.values381220838208