Why do we reassign the result given by replace() to the original variable?

So that the variable gets the updated valueTo not cause an error in our codeSo that the original variable is not updatedTo increase the lines of code we have

So that the variable gets the updated value.