diff --git a/guide/english/certifications/javascript-algorithms-and-data-structures/basic-javascript/understand-string-immutability/index.md b/guide/english/certifications/javascript-algorithms-and-data-structures/basic-javascript/understand-string-immutability/index.md index 4bdae9338f..a98959189b 100644 --- a/guide/english/certifications/javascript-algorithms-and-data-structures/basic-javascript/understand-string-immutability/index.md +++ b/guide/english/certifications/javascript-algorithms-and-data-structures/basic-javascript/understand-string-immutability/index.md @@ -3,8 +3,19 @@ title: Understand String Immutability --- ## Understand String Immutability -This is a stub. Help our community expand it. +## Problem Explanation +Correct the assignment to ```myStr``` so it contains the string value of ```Hello World``` using the approach shown in the example above. -This quick style guide will help ensure your pull request gets accepted. +## Hint +Instead of ```Jello World ```, ```myStr``` should be assigned ```Hello World```. - + ## Spoiler Alert! Solution ahead. +**Solution** +```javascript +// Setup +var myStr = "Jello World"; + // Only change code below this line + myStr = "Hello World"; +``` + ## Code Explanation +String literals such as ```"Jello World"``` cannot be changed by the individual letter (hence being *immutable*), so the variable containing the incorrect string must be replaced with the desired string using the assignment operator ```=```