DEV Community


What do you prefer for your variable names? camelCase or snake_case?

lffg profile image Luiz Felipe Gonçalves ・1 min read

I so badly wished JavaScript to be snake_case by convention...

Discussion (6)

ahferroin7 profile image
Austin S. Hemmelgarn

Whichever the language itself prefers, because consistency is a good thing.

I tend towards snake case by default out of habit, but I tend to not use multi-word variable names (multi-word function names, however, I use a lot).

codenutt profile image
jenc profile image
jen chan

Also into camelcase but it must be JS convention and if I knew a different language maybe that would change...

codenutt profile image

It is but its common in other languages too, e.g. Kotlin/Swift :)

tahatesser profile image
Taha Tesser

camelCase all day

vickilanger profile image
Vicki (she/her)

snake_case because it’s Python convention.

I’m not a fan of camelCase. Like smashing words together ever made sense... I also avoid JavaScript.

Forem Open with the Forem app