Tell us what’s happening: Please why do I have to include my Addition mark inside my functions parameters strings twice? I don’t get it. Please clear me.
Your code so far
var myStr = "Jello World";
// Only change code below this line
var myStr = "Jello World"; // Fix Me
myStr = "Hello World";
myStr = "H";
Your browser information:
User Agent is:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36.
Link to the challenge:
Like the instruction says string values are immutable. So your last line of code
myStr = "H"; is invalid.
And myStr has already been declared and intialized on the setup. So you can just directly assign
“Hello World” into myStr variable which is what you already have 2nd line from the bottom.
Here is the solution if you still can’t figure it out.
Look at the example. They showed you the only way to change myStr would be to assign it with a new string (see below).
var myStr = "Bob";
myStr = "Job";
Thanks guys. Just that I don’t know how to use this Forum yet. I sorted my string immutability already.
What I needed is “Please why do I have to include my Addition mark inside my functions parameters strings twice? I don’t get it. Please clear me”_