Skip to content

Commit 39aca70

Browse files
authored
fix missed line breaks
1 parent 6e51574 commit 39aca70

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ alert(id); // TypeError: Cannot convert a Symbol value to a string
5353
That's a "language guard" against messing up, because strings and symbols are fundamentally different and should not accidentally convert one into another.
5454
5555
If we really want to show a symbol, we need to explicitly call `.toString()` on it, like here:
56+
5657
```js run
5758
let id = Symbol("id");
5859
*!*
@@ -61,6 +62,7 @@ alert(id.toString()); // Symbol(id), now it works
6162
```
6263
6364
Or get `symbol.description` property to show the description only:
65+
6466
```js run
6567
let id = Symbol("id");
6668
*!*

0 commit comments

Comments
 (0)