Add code tags to myStr in instructions

This commit is contained in:
Eric Leung 2016-01-17 21:56:12 -08:00
parent bd4a3f4b94
commit bcb7717b0e

View File

@ -1116,7 +1116,7 @@
"In Javascript, <code>String</code> values are <dfn>immutable</dfn>, which means that they cannot be altered once created.",
"For example, the following code:",
"<blockquote><code>var myStr = \"Bob\";<br>myStr[0] = \"J\";</code></blockquote>",
"cannot change the value of <code>myStr</code> to \"Job\", because the contents of myStr 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><code>var myStr = \"Bob\";<br>myStr = \"Job\";</code></blockquote>",
"<h4>Instructions</h4>",
"Correct the assignment to <code>myStr</code> to achieve the desired effect."