Skip to content

Commit 2b0f686

Browse files
authored
Merge pull request lydiahallie#695 from stuymedova/patch-3
Paraphrase
2 parents 2f2708e + 11767f4 commit 2b0f686

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2378,7 +2378,7 @@ console.log(shape);
23782378

23792379
`Object.freeze` makes it impossible to add, remove, or modify properties of an object (unless the property's value is another object).
23802380

2381-
When we create the variable `shape` and set it equal to the frozen object `box`, `shape` also refers to a frozen object. You can check whether an object is frozen by using `Object.isFrozen`. In this case, `Object.isFrozen(shape)` returns true, since the variable `shape` has a reference to a frozen object.
2381+
When we create the variable `shape` and set it equal to the frozen object `box`, `shape` also refers to a frozen object. You can check whether an object is frozen by using `Object.isFrozen`. In this case, `Object.isFrozen(shape)` would return true, since the variable `shape` has a reference to a frozen object.
23822382

23832383
Since `shape` is frozen, and since the value of `x` is not an object, we cannot modify the property `x`. `x` is still equal to `10`, and `{ x: 10, y: 20 }` gets logged.
23842384

0 commit comments

Comments
 (0)