Javascript only enforces reassignments to const. So this,
const arr = []
arr.push(“grape nuts”]
is just peachy in JS and requires the programmer to avoid using it.More importantly, because working immutably in JS is not enforced, trying to use it consistently either limits which libraries you can use and/or requires you to wrap them to isolate their side effects. ImmerJS can help a lot here, since immutability is its whole jam. I’d rather work in a language where I get these basic benefits by default, though.