Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Which style is best? [closed]

Asked by 9 years ago

I've seen,

myvariablename = "String"

I've seen,

MyVariableName = "String"

I've seen,

myVariableName = "String"

I've seen,

my_variable_name = "String"

I know these all work the same but which one is best?

Locked by TheMyrco

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

3 answers

Log in to vote
2
Answered by
KarlXYZ 120
9 years ago

I wouldn't say there is a "best" way to format your variables. I guess it's just down to personal preference.

I'll tend to use myVariableName (First word is lower-case, rest are upper-case).

Ad
Log in to vote
0
Answered by 9 years ago

I use MyVariableName. It does not really matter, use the one you like.

Log in to vote
0
Answered by
TheMyrco 375 Moderation Voter
9 years ago

Very technically speaking, the one with the most lowercase letters and the least amount of charcters would be the best.

But really .. that's so, so, so small that it's neglegible. It really comes down to personal preferences, as said by the others.