Skip to content

Commit 6d2fbff

Browse files
authored
Fix preventExtensions misspell
1 parent 5f94ceb commit 6d2fbff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

challenges/objects-concepts.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,19 +281,19 @@ Except `value`, other accessort mentioned accept true or false
281281
#### Q10
282282
### Show the different options available to prevent the modifications to the object
283283

284-
- `preventExtension` is an Object method which prevents addition of any new property to an object
284+
- `preventExtensions` is an Object method which prevents addition of any new property to an object
285285
- `seal` is an Object method which prevents addition and deletion of any property in an object
286286
- `freeze` is an Object method which prevents addition, deletion and update of any property of an object
287287
- There are also methods `isExtensible`, `isSealed` and `isFrozen` on Object to check
288288

289289
```js
290-
Object.preventExtension(obj);
291-
Object.isExtensible(obj); // true
290+
Object.preventExtensions(obj);
291+
Object.isExtensible(obj); // false
292292
```
293293

294294
```js
295295
Object.seal(obj);
296-
Object.isSealed(obj) // true
296+
Object.isSealed(obj); // true
297297
```
298298

299299
```js

0 commit comments

Comments
 (0)