Update formatting

This commit is contained in:
Isabelle Viktoria Maciohsek
2022-01-30 12:02:34 +02:00
parent e9019d4c20
commit 6f11554999
13 changed files with 15 additions and 15 deletions

View File

@ -7,7 +7,7 @@ lastUpdated: 2020-10-11T11:52:48+03:00
Creates a frozen `Set` object.
- Use the `new Set()` constructor to create a new `Set` object from `iterable`.
- Use the `Set` constructor to create a new `Set` object from `iterable`.
- Set the `add`, `delete` and `clear` methods of the newly created object to `undefined`, so that they cannot be used, practically freezing the object.
```js
@ -21,6 +21,6 @@ const frozenSet = iterable => {
```
```js
frozenSet([1, 2, 3, 1, 2]);
frozenSet([1, 2, 3, 1, 2]);
// Set { 1, 2, 3, add: undefined, delete: undefined, clear: undefined }
```