Web platform features explorer

WeakMap

Widely available since 2018-01-29
Tags: javascript Groups: JavaScript > Collections

A WeakMap object holds key-value pairs that do not create strong references to its keys, such that value data can be associated with a key without preventing garbage collection of the key.

Learn more

Browser support

  • Chrome 36 Released on 2014-07-16
  • Chrome Android 36 Released on 2014-07-16
  • Edge 12 Released on 2015-07-29
  • Firefox 6 Released on 2011-08-16
  • Firefox for Android 6 Released on 2011-08-16
  • Safari 8 Released on 2014-10-16
  • Safari on iOS 8 Released on 2014-09-17