Skip to content

Challenge Understand String Immutability

SaintPeter edited this page · 1 revision
Clone this wiki locally

Understand String Immutability

In Javascript, String values are immutable, which means that they cannot be altered once created.

Example

var myStr = "Bob";
myStr[0] = "J";

Would not work, the only way would be:

var myStr = "Bob";
myStr = "Job";
Something went wrong with that request. Please try again.