Understand String Immutability - answer is not working

Tell us what’s happening:

Your code so far


// Setup
var myStr = "Jello World";

// Only change code below this line

myStr[0] = "J"; // Fix Me


Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/understand-string-immutability/

Please be more specific on what seems to be the problem, your answer seems to have been to change the H to J while the challenge says:

Correct the assignment to myStr so it contains the string value of Hello World using the approach shown in the example above.

Hello
As the lesson says “The only way to change myStr would be to assign it with a new string”

You must use

myStr = "Hello World";

I have used "Hello World " Still not working .
This is my code

// Setup

var myStr = “Jello World”;
// Only change code below this line
myStr = “Hello World”;
myStr[0] = “H”; // Fix Me

This is the complete code here

// Setup
var myStr = "Jello World";

// Only change code below this line

myStr = "Hello World"; // Fix Me
1 Like

Thank you so much. I was not able to understand the problem properly.

Youre welcome @Gursimranjot