Skip to content

Commit 344c36f

Browse files
committed
minor fixes
1 parent 9b95054 commit 344c36f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

1-js/04-object-basics/08-symbol/article.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ alert(id1 == id2); // false
4444

4545
If you are familiar with Ruby or another language that also has some sort of "symbols" -- please don't be misguided. JavaScript symbols are different.
4646

47+
To summarize, symbols are "special unique values" with optional description. Let's see where we can use them.
48+
4749
````warn header="Symbols don't auto-convert to a string"
4850
Most values in JavaScript support implicit conversion to a string. For instance, we can `alert` almost any value, and it will work. Symbols are special. They don't auto-convert.
4951
@@ -80,6 +82,7 @@ alert(id.description); // id
8082

8183
## "Hidden" properties
8284

85+
8386
Symbols allow us to create "hidden" properties of an object, that no other part of code can accidentally access or overwrite.
8487

8588
For instance, if we're working with `user` objects, that belong to a third-party code. We'd like to add identifiers to them.

0 commit comments

Comments
 (0)