Skip to content

Challenge Understand String Immutability

Quincy Larson edited this page Aug 20, 2016 · 1 revision

Challenge 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";
Clone this wiki locally