No you cannot. It doesn’t matter how a string variable is declared, it is immutable. For example, the following strings cannot be mutated.
const firstName = 'John';
let surName = 'Doe';
var otherName = 'Jane';
Any variable declared with let or var key word can be reassigned. However variables declared with const keyword cannot be reassigned. This is not limited to string variables. Don’t confuse mutation with reassignment.
No you can’t because that had still defeat the immutability rule to my best understanding.
String is practically immutable.
you can however change arrays like this:
const myString = [[“foo”], [“simic21”]]
myString.shift()
myString.unshift([“veronika”])
console.log(myString)
and you would have [[“veronica”], [“simic21”]]