Hacker News new | past | comments | ask | show | jobs | submit login

The fact that a const can't be changed is great but in my mind the bigger thing is what the code communicates. Using const vs let tells future devs who work on the code that the value was meant to remain unchanged. If they need to change it, that's a signal that maybe there's more to it than they currently understand.

I agree that pull requests that mass change from let to const are largely a waste of time, but usage of const vs let is a legitimate discussion within your team.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: