Skip to content

Commit ab05a00

Browse files
committed
Clean up wording of symbol descriptions (fixes nzakas#135)
1 parent fe13177 commit ab05a00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

manuscript/04-Symbols.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ With computed property names in object literals, symbols are very easy to work w
8484

8585
You may find that you want different parts of your code to use the same symbols. For example, suppose you have two different object types in your application that should use the same symbol property to represent a unique identifier. Keeping track of symbols across files or large codebases can be difficult and error-prone. That's why ECMAScript 6 provides a global symbol registry that you can access at any point in time.
8686

87-
When you want to create a symbol to be shared, use the `Symbol.for()` method instead of calling `Symbol()`. The `Symbol.for()` method accepts a single parameter, which is a string identifier for the symbol you want to create (this value doubles as the description). For example:
87+
When you want to create a symbol to be shared, use the `Symbol.for()` method instead of calling `Symbol()`. The `Symbol.for()` method accepts a single parameter, which is a string identifier for the symbol you want to create (this value is also used as the description). For example:
8888

8989
```js
9090
var uid = Symbol.for("uid");

0 commit comments

Comments
 (0)