Skip to content

Commit 6e51574

Browse files
authored
Fixed the display on the site
1 parent bf6d3c9 commit 6e51574

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ Symbols are always different values, even if they have the same name. If we want
268268
Symbols have two main use cases:
269269

270270
1. "Hidden" object properties.
271+
271272
If we want to add a property into an object that "belongs" to another script or a library, we can create a symbol and use it as a property key. A symbolic property does not appear in `for..in`, so it won't be accidentally processed together with other properties. Also it won't be accessed directly, because another script does not have our symbol. So the property will be protected from accidental use or overwrite.
272273

273274
So we can "covertly" hide something into objects that we need, but others should not see, using symbolic properties.

0 commit comments

Comments
 (0)