Primitives are immutable, there is no way to change its value.
var a = 'abc';
a[0] = 'b';
console.log(a);// abc as it is immutable
However, if I use wrapper object
var a = new String('abc');
typeof a// object
a[0] = 'b';
console.log(a);// abc <----- I actually expect it to be bbc as a is a object which by default should be mutable.
Can someone explain this to me? Is it my misunderstanding of the concept of "mutable" and "immutable" that makes myself confused?