Skip to content

Commit 5b40f88

Browse files
authored
Update README.md
1 parent 14d82cb commit 5b40f88

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,15 @@ And the last possible solution is to assign undefined to the key to be removed
117117
118118
For the API consistency, I'm proposing to add a plus operator (expressed by a prepending `+` sign), which would allow to forrcefully specify a value for a given key in the same manner.
119119

120+
```js
121+
// Same
122+
const result = {
123+
...objA,
124+
...objB,
125+
+keyToAdd: valueToAdd,
126+
};
127+
```
128+
120129
For instance:
121130

122131
```js

0 commit comments

Comments
 (0)