Skip to content

Commit

Permalink
doc: remove "note that" from using-symbols.md
Browse files Browse the repository at this point in the history
Refs: nodejs/remark-preset-lint-node#16

PR-URL: #28329
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
Trott authored and targos committed Jul 2, 2019
1 parent ffba80b commit 9461ef8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions doc/guides/using-symbols.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbo
## `Symbol(string)`

Symbols created via `Symbol(string)` are local to the caller function.
Note that `Symbol('hello') !== Symbol('hello')`.
For this reason, we often use them to simulate private fields, like so:

```js
Expand All @@ -31,8 +30,7 @@ class MyObject {
module.exports.MyObject = MyObject;
```

Note that Symbols are not _fully private_, as the data could be accessed
anyway:
Symbols are not fully private, as the data could be accessed anyway:

```js
for (const s of Object.getOwnPropertySymbols(obj)) {
Expand Down

0 comments on commit 9461ef8

Please sign in to comment.