Skip to content
Permalink
Browse files

doc: remove "note that" from using-symbols.md

Refs: nodejs/remark-preset-lint-node#16

PR-URL: #28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information...
Trott authored and targos committed Jun 20, 2019
1 parent ffba80b commit 9461ef8afbe7d80ae819d4cb56dfc0f9e4ac633c
Showing with 1 addition and 3 deletions.
  1. +1 −3 doc/guides/using-symbols.md
@@ -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
@@ -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)) {

0 comments on commit 9461ef8

Please sign in to comment.
You can’t perform that action at this time.