Skip to content

Commit 00fac87

Browse files
authored
FF144 Relnote: JS Upsert Proposal (#41253)
1 parent 5d83f26 commit 00fac87

File tree

1 file changed

+5
-1
lines changed
  • files/en-us/mozilla/firefox/releases/144

1 file changed

+5
-1
lines changed

files/en-us/mozilla/firefox/releases/144/index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ Firefox 144 is the current [Beta version of Firefox](https://www.firefox.com/en-
5252

5353
<!-- #### Removals -->
5454

55-
<!-- ### JavaScript -->
55+
### JavaScript
56+
57+
- The {{jsxref("Map.prototype.getOrInsert()")}}, {{jsxref("Map.prototype.getOrInsertComputed()")}}, {{jsxref("WeakMap.prototype.getOrInsert()")}}, and {{jsxref("WeakMap.prototype.getOrInsertComputed()")}} instance methods are now supported.
58+
All the methods return the value corresponding to a specified key if the key is present.
59+
If the key is not present, `getOrInsert()` inserts and returns an element for the key and a given default value, while `getOrInsertComputed()` inserts and returns a value computed in a supplied callback function. ([Firefox bug 1979917](https://bugzil.la/1979917)).
5660

5761
<!-- No notable changes. -->
5862

0 commit comments

Comments
 (0)