I would quickly disabuse yourself of the notion that all values are immutable in JavaScript, as otherwise you will cause yourself and colleagues a lot of pain in future. As someone that has to write or maintain a lot of JavaScript, saying that I don't have to think about data changing over the course of a program doesn't strike me as true at all (I wish it was).
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data...
As linked, only some of the primitive values in javascript are immutable. So while you can be confident in this:
const x = 'a perfectly well formed string';
// lots of code in between
console.log(x) // will always print 'a perfectly well formed string'
You cannot be confident in this at all:
const x = {
a: 'a perfectly well formed string within an object'
};// lots of code in between
console.log(x.a) // absolutely no guarantee that x.a will point at the same string as at the time x was initialized as an object, or that the key will even exist (will fallback to the type 'undefined' if you attempt to read it).
JavaScript has references and values like most languages, but you aren't dealing with memory as explicitly as Rust or C. The reason is in large part because memory is garbage collected in Javascript.