are strings mutable?
fname = “hello”
fname = fname + " world"
console.log(fname) => hello world
is above an example of mutability?
are strings mutable?
fname = “hello”
fname = fname + " world"
console.log(fname) => hello world
is above an example of mutability?
Strings in javascript are immutable. Whenever a modification is made to a string, a new memory is allocated and assigned to the variable.