When writing JavaScript logic in a Lightning Component controller or helper using the ECMAScript 6: maps and sets would lead to cleaner code in some cases.

There is mention of Map and Set in this Lightning Components Collection Types documentation but that may be conceptual (or be related to Apex types). This Salesforce Lightning CLI Rules Validate JavaScript Intrinsic APIs (ecma-intrinsics) documentation links to ECMAScript documentation that includes Map and Set.

Map and Set are available in Chrome. But can I assume they available anywhere a Lightning Component can run?


This asks a similar but broader question ECMAScript2015 compatibility and does not have an accepted answer.

1 Answer 1


Maps, Sets, Weakmaps and Weaksets are all supported by Lockerservice even though they don't have any official documentation explicitly stating so. You can check their SecureWindow compatibility table and note that the actual columns for Browser API and Locker API both state function instead of Not To Be Supported.

  • Thanks should have looked there. Can you confirm that the supported browsers all support Map and Set?
    – Keith C
    May 3, 2017 at 21:20
  • Browser support is good enough for Map and Set except for IE 11 which has partial support. May 4, 2017 at 19:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .