From 39aca7098477e2c5318b273b66b3c660a895a748 Mon Sep 17 00:00:00 2001 From: Lavrentiy Rubtsov Date: Wed, 23 Mar 2022 00:00:51 +0600 Subject: [PATCH] fix missed line breaks --- 1-js/04-object-basics/08-symbol/article.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/1-js/04-object-basics/08-symbol/article.md b/1-js/04-object-basics/08-symbol/article.md index 2401b400..7b7d8a4b 100644 --- a/1-js/04-object-basics/08-symbol/article.md +++ b/1-js/04-object-basics/08-symbol/article.md @@ -53,6 +53,7 @@ alert(id); // TypeError: Cannot convert a Symbol value to a string That's a "language guard" against messing up, because strings and symbols are fundamentally different and should not accidentally convert one into another. If we really want to show a symbol, we need to explicitly call `.toString()` on it, like here: + ```js run let id = Symbol("id"); *!* @@ -61,6 +62,7 @@ alert(id.toString()); // Symbol(id), now it works ``` Or get `symbol.description` property to show the description only: + ```js run let id = Symbol("id"); *!*