Merge pull request #13433 from systimotic/fix/clarify-string-immutability

Clarify instructions in the string immutability challenge
This commit is contained in:
Dylan
2017-02-18 19:03:05 -06:00
committed by GitHub

View File

@ -1486,7 +1486,7 @@
"cannot change the value of <code>myStr</code> to \"Job\", because the contents of <code>myStr</code> cannot be altered. Note that this does <em>not</em> mean that <code>myStr</code> cannot be changed, just that the individual characters of a <dfn>string literal</dfn> cannot be changed. The only way to change <code>myStr</code> would be to assign it with a new string, like this:", "cannot change the value of <code>myStr</code> to \"Job\", because the contents of <code>myStr</code> cannot be altered. Note that this does <em>not</em> mean that <code>myStr</code> cannot be changed, just that the individual characters of a <dfn>string literal</dfn> cannot be changed. The only way to change <code>myStr</code> would be to assign it with a new string, like this:",
"<blockquote>var myStr = \"Bob\";<br>myStr = \"Job\";</blockquote>", "<blockquote>var myStr = \"Bob\";<br>myStr = \"Job\";</blockquote>",
"<hr>", "<hr>",
"Correct the assignment to <code>myStr</code> to achieve the desired effect that is intended by <code>myStr[0] = \"H\" ;</code>." "Correct the assignment to <code>myStr</code> so it contains the string value of <code>Hello World</code> using the approach shown in the example above."
], ],
"releasedOn": "January 1, 2016", "releasedOn": "January 1, 2016",
"challengeSeed": [ "challengeSeed": [