Can I use a variable to name other variables?

Which is better way to name the variables and why do you use like that?

  • example : device_status or deviceStatus

  • Answer:

    I personally avoid underscores, it's kind of ... You must be signed in to read this answer.Connected to GoogleConnected to FacebookBy continuing you indicate that you have read and agree to the .  Loading account...Complete Your ProfileFull NameChecking...EmailChecking...PasswordChecking...By creating an account you indicate that you have read and agree to the .

Anonymous at Quora Visit the source

Was this solution helpful to you?

Other answers

Depends on what I am coding in. If it's C or C++, I'd go for this_any_day, because it would blend in better with the library method names that are mostly in snake_case. For the same reason, I would never use anything other than the good ol' lowerCamelCase in Java.

Praveen Sampath

i_use_this_cuz_its_readable

Karan Goel

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.