3 ms·
> camel casing variable names is right, Personally I disagree. In my code-bases it's: functions: doSomeThing() constructor:
by M1573RMU74710N 15y ago
> camel casing variable names is right,
Personally I disagree. In my code-bases it's:
functions: doSomeThing()
constructor: new Foobar()
object/array/primitive: some_object
"constants": SOME_VALUE
I find that much more readable, especially when looking at code completion in the IDE, I can always tell whether a property is a method or not.
For example, you might have an object foo that has a property called isBar. I like being able to tell that that is a function that returns a true or false value, as opposed to is_bar which just holds the boolean value.