diff --git a/snippets/deepFreeze.md b/snippets/deepFreeze.md index 67d0007f6..6193d9d72 100644 --- a/snippets/deepFreeze.md +++ b/snippets/deepFreeze.md @@ -6,7 +6,7 @@ tags: object,recursion,intermediate Deep freezes an object. Use `Object.keys()` to get all the properties of the passed object, `Array.prototype.forEach()` to iterate over them. -Call `Object.freeze(obj)` recursively on all properties, checking if each object is frozen using `Object.isFrozen()` and applying `deepFreeze()` as necessary. +Call `Object.freeze(obj)` recursively on all properties, checking if each one is frozen using `Object.isFrozen()` and applying `deepFreeze()` as necessary. Finally, use `Object.freeze()` to freeze the given object. ```js