reading:
... for
function and method names, you can use lower camel case, as in
myFunction()
,
calculateArea()
and
getFirstName()
.
And what about variables that are not functions? Developers commonly use lower
camel case for variable names, but another good idea is to use all lowercase words
delimited by an underscore: for example,
first_name
,
favorite_bands
, and
old_company_name
. This notation helps you visually distinguish between functions and
all other identifiers—primitives and objects.
Not sure what you expect the opinions to be. Conventions are conventions. The can even vary within the same project
My first time hearing about different casing for functions and variables, hence the question
As long as it's consistent you can choose to do whatever naming convention (camel case, snake case, etc) you want.
Обсуждают сегодня