This is the code
let name = 'John';
name[1] = 'a';
name[2] = 'n';
name[3] = 'e';
I know Javascript strings are immutable. The lines 2, 3 and 4 are not gonna work and if I console.log(name), the output will be 'John'. But why is Js not throwing an error for line 2, 3, 4 ?