Yeah exactly. That's what I've loved about Rust and hated about real-world JS. I end up having to reason about an entire case that might not be real at all: does this function mutate what I'm passing it? Should I eagerly deep copy my object? UGH.
replyJust call "Object.freeze()" before "return" in your function.
replyThat only goes one level deep so it’s not much of a guarantee
reply