Skip to content

Commit

Permalink
Adding let when declaring a variable so it's consistent with other ex…
Browse files Browse the repository at this point in the history
…amples (#2153)
  • Loading branch information
avivmu authored Feb 8, 2021
1 parent 7a09082 commit 962cc77
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ <h3 id="Escaping_characters_in_a_string">Escaping characters in a string</h3>

<p>To fix our previous problem code line, we need to escape the problem quote mark. Escaping characters means that we do something to them to make sure they are recognized as text, not part of the code. In JavaScript, we do this by putting a backslash just before the character. Try this:</p>

<pre class="brush: js">bigmouth = 'I\'ve got no right to take my place...';
<pre class="brush: js">let bigmouth = 'I\'ve got no right to take my place...';
bigmouth;</pre>

<p>This works fine. You can escape other characters in the same way, e.g. <code>\"</code>,  and there are some special codes besides. See <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#escape_notation">Escape notation</a> for more details.</p>
Expand Down

0 comments on commit 962cc77

Please sign in to comment.