DEV Community

Discussion on: Declaring JS Variables in 2019

Collapse
 
jimbotsov profile image
JimboTSoV

I disagree regarding const. Spamming the keyword inflates it's meaning to me. I believe you should only use it when you actively intend a variable to be unchangeable - because otherwise when reading another person's code I would conclude you just used the keyword without thought and disregard const as a whole.
I do agree with the rest of your post in general though. Instead of using constants as a default, I'd recommend to rather put thought into your code before deciding which keyword to use.
But to quote you, this is just my opinion piece 😉