Skip to content

Commit 66b891e

Browse files
committed
Use the term identity when introducing mutability
Issue marijnh#420
1 parent 755a023 commit 66b891e

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

04_data.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -441,10 +441,11 @@ console.log(object3.value);
441441

442442
{{index "tentacle (analogy)", [binding, "model of"]}}
443443

444-
The `object1` and `object2` bindings grasp the _same_ object, which
445-
is why changing `object1` also changes the value of `object2`. The
446-
binding `object3` points to a different object, which initially
447-
contains the same properties as `object1` but lives a separate life.
444+
The `object1` and `object2` bindings grasp the _same_ object, which is
445+
why changing `object1` also changes the value of `object2`. They are
446+
said to have the same _identity_. The binding `object3` points to a
447+
different object, which initially contains the same properties as
448+
`object1` but lives a separate life.
448449

449450
{{index "const keyword", "let keyword"}}
450451

@@ -457,12 +458,12 @@ the same object, the _contents_ of that object might change.
457458

458459
{{index "== operator", [comparison, "of objects"], "deep comparison"}}
459460

460-
When you compare objects with JavaScript's `==` operator, it will
461-
produce `true` only if both objects are precisely the same value.
462-
Comparing different objects will return `false`, even if they have
463-
identical properties. There is no "deep" comparison operation built
464-
into JavaScript, which compares objects by contents, but it is
465-
possible to write it yourself (which is one of the
461+
When you compare objects with JavaScript's `==` operator, it compares
462+
by identity: It will produce `true` only if both objects are precisely
463+
the same value. Comparing different objects will return `false`, even
464+
if they have identical properties. There is no "deep" comparison
465+
operation built into JavaScript, which compares objects by contents,
466+
but it is possible to write it yourself (which is one of the
466467
[exercises](data#exercise_deep_compare) at the end of this chapter).
467468

468469
## The lycanthrope's log

0 commit comments

Comments
 (0)