Skip to content

Commit 1fd8912

Browse files
Vihan BhargavaAurelioDeRosa
Vihan Bhargava
authored andcommitted
Types: Clarified where to use parenthesis in numbers to strings convertion
Fixes gh-870
1 parent 4ee55d3 commit 1fd8912

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pages/Types.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ <h3 id="Parsing_Numbers"> Parsing Numbers </h3>
205205
parseFloat( "10.10" ) = 10.1
206206
</code></pre>
207207
<h3 id="Numbers_to_Strings"> Numbers to Strings </h3>
208-
<p>When appending numbers to string, the result is always a string. The operator is the same, so be careful: If you want to add numbers and then append them to a string, put parentheses around them:
208+
<p>When appending numbers to string, the result is always a string. The operator is the same, so be careful: If you want to add numbers and then append them to a string, put parentheses around the numbers:
209209
</p>
210210
<pre><code data-lang="javascript">"" + 1 + 2; // "12"
211211
"" + ( 1 + 2 ); // "3"

0 commit comments

Comments
 (0)