Map getOrInsert()
The getOrInsert() and getOrInsertComputed() methods of Map objects get a value, setting and getting a default value if needed.
Status
Limited availability
MDN documentation
Browser support
- Chrome ❌
- Chrome Android ❌
- Edge ❌
- Firefox 144 Released on 2025-10-14
- Firefox for Android 144 Released on 2025-10-14
- Safari ❌
- Safari on iOS ❌
View as JSON | Edit this feature | Report an issue | Web-features entry: source, dist