Modify a Constant

suggest change
MY_CONSTANT = "Hello, world"
MY_CONSTANT = "Hullo, world"

The above code warns, because the constant is assigned twice. Mutating the object the constant refers to does not warn. This changes the second character:

MY_CONSTANT = "Hello, world"
MY_CONSTANT[1] = "u"

Now, after changing the second letter of MY_CONSTANT, it becomes "Hullo, world".

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents