DEV Community

Discussion on: Coding Conventions for Writing JavaScript

Collapse
 
devdufutur profile image
Rudy Nappée

I agree with almost each of these conventions.

However, in FP, you use a lot of "const", I don't think it's a good idea to have almost all your (un)variables in UPPER_CASE.

I would use UPPER_CASE only for global constants and still use camelCase for local constants.

Collapse
 
aumayeung profile image
John Au-Yeung

That's not a bad idea. I think consistency is more important than the case in this situation.

Collapse
 
mateiadrielrafael profile image
Matei Adriel

I agree with that, UPPER_CASE give me #define vibes (not saying that's a bad thing, but it's weird to do it anywhere but st the global level / for stuff like functions)