I know, that all data types (primitives) in Js except objects are immutable. So we can't do something:
let str = 'str';
str[0] = 't'; //error in strict mode
But we can do following:
let str = 'str';
str = null;
why this works and why primitives are immutable and objects are mutable? I want to know what happened "under hood" (deep explaining).