Web platform features explorer

Map getOrInsert()

The getOrInsert() and getOrInsertComputed() methods of Map objects get a value, setting and getting a default value if needed.

Status

Limited availability

Browser support

  • Chrome See issues.chromium.org/u/1/issues/434977728
  • Chrome Android
  • Edge
  • Firefox 144 Released on 2025-10-14
  • Firefox for Android 144 Released on 2025-10-14
  • Safari 26.2 Released on 2025-12-12
  • Safari on iOS 26.2 Released on 2025-12-12

Developer votes

Do you need this feature?
Let us know by leaving a 👍 reaction on the feedback issue. Don't forget to also leave a comment explaining your specific use case.