re: Demystifying "const" variables in JavaScript VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Thanks for the post. I use const only for constants in top-level scope like const URL = 'https://example.com'. For other scenarios I prefer to use ...
 

Thanks for sharing that post.

I'm not sure I can fully agree with Kyle. Most of his points are fair, but the main goal of const is to communicate intention. Yes if I didn't reassign my variable, then I intend on it not to change. Later on when I come back and want to change it that's fine, I just know that it's not being changed currently so I can be more aware of that.

 

Agreed, that post misses the point.

Why am I not surprised that someone like that is on the language committee? (I'd say JS culture is basically worse is better, but somehow its movers and shakers manage to screw up even that up.)

code of conduct - report abuse