0
Capitalization
Must you capitalise the second word of the identifier? Such as myAge. Could it be myage or MyAge?
2 Réponses
+ 3
Lets take an example
Suppose you want to declare a variable named first name.
Now as spacing is not allowed , most common way is to write it as firstName to show its not one word like firstname but its another word.
Btw other one is also fine.
It depends on you.
Hope thia helps☺️☺️
+ 1
It depends on language you use. For exmple, in Ruby you can't name normal variable with capital letter on it's beggining, because only constants are names with capital letter. In most languages you can use myAge, MyAge or myage, but the first methd is prefered. It's called camel-case style. It's easier to read.