DEV Community

Discussion on: Javascript var, let and const

Collapse
 
nagwan profile image
nagwan sami • Edited

i loved the rhythm 😃
a huge portion in the community agrees on the same,
but i believe in making it more flexible as for some use cases variables are made to be updated, and for newbies, I am not sure if it is easy to know when you cannot form the early start,
but after all, i totally agree

Collapse
 
chiubaca profile image
Alex Chiu • Edited

I agree it's weird learning curve for newbies. I also enforce this convention with ESLint no-const-assign . This means that whenever I try to reassign a const, my linter will remind me to convert it to a let.

see the following - eslint.org/docs/rules/no-const-assign

Thread Thread
 
nagwan profile image
nagwan sami

oh🤩,
i have not tried that before,
it looks handy,
thanks for sharing🙏