DEV Community

Discussion on: `let` vs `const` and The Mental Mass of Functions

Collapse
katzy687 profile image
Natti Katz Author

that's a great point.

The method above is probably more useful with primitives.

In the case where I wanted to slice to a new array, or convert to an immutable data structure I would stick with let.

But the point remains that I wouldn't necessarily want to use let unless that I knew I was going to be doing some reassignment to preserve immutability.