Hacker News new | ask | show | jobs
by igemnace 3199 days ago
`const` doesn't mean immutable data. It means immutable variables, i.e. you can't reassign to `const` variables. You can mutate the data regardless (push to an array, add a new key to an object), unless the variable points to an immutable value to begin with (primitives, or actual immutable data structures such as with Immutable.js).