Clarify concatenating strings with +=

- Be more specific in what needs to be done using the plus equals
- Remove unnecessary line break before strings to be concatenated
This commit is contained in:
Eric Leung
2017-02-26 14:28:29 -08:00
parent ba1093c42f
commit 3a16595e52

View File

@ -1217,7 +1217,7 @@
"We can also use the <code>+=</code> operator to <dfn>concatenate</dfn> a string onto the end of an existing string variable. This can be very helpful to break a long string over several lines.",
"<strong>Note</strong><br>Watch out for spaces. Concatenation does not add spaces between concatenated strings, so you'll need to add them yourself.",
"<hr>",
"Build <code>myStr</code> over several lines by concatenating these two strings:<br><code>\"This is the first sentence. \"</code> and <code>\"This is the second sentence.\"</code> using the <code>+=</code> operator."
"Build <code>myStr</code> over several lines by concatenating these two strings: <code>\"This is the first sentence. \"</code> and <code>\"This is the second sentence.\"</code> using the <code>+=</code> operator. Use the <code>+=</code> operator similar to how it is shown in the editor. Start by assigning the first string to <code>myStr</code>, then add on the second string."
],
"releasedOn": "January 1, 2016",
"challengeSeed": [