Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript string is mutable

var immutableString = "Hello";

// In the above code, a new object with string value is created.

immutableString = immutableString + "World";

// We are now appending "World" to the existing value.
 
PREVIOUS NEXT
Tagged: #javascript #string #mutable
ADD COMMENT
Topic
Name
6+7 =