Skip to content

Commit ac92672

Browse files
authored
And a little more
More little tweaks. That should do for now.
1 parent 865c329 commit ac92672

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

1-js/04-object-basics/02-object-copy/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ And here's how it's actually stored in memory:
3737

3838
The object is stored somewhere in memory (at the right of the picture), while the `user` variable (at the left) has a "reference" to it.
3939

40-
We may think of an object variable, such as `user`, as like a sheet of paper with the address.
40+
We may think of an object variable, such as `user`, as like a sheet of paper with the address of the object on it.
4141

4242
When we perform actions with the object, e.g. take a property `user.name`, the JavaScript engine looks at what's at that address and performs the operation on the actual object.
4343

@@ -246,7 +246,7 @@ user.name = "Pete"; // (*)
246246
alert(user.name); // Pete
247247
```
248248

249-
It might seem that the line `(*)` would cause an error, but it does not. The value of `user` is constant, it must always reference the same object. But properties of that object are free to change.
249+
It might seem that the line `(*)` would cause an error, but it does not. The value of `user` is constant, it must always reference the same object, but properties of that object are free to change.
250250

251251
In other words, the `const user` gives an error only if we try to set `user=...` as a whole.
252252

0 commit comments

Comments
 (0)