Hi guys, I encountered this in
One of the instruction says
First we declare a function using var, and then give it a name sayHello. The name should begin with a lowercase letter and the convention is to use lowerCamelCase where each word (except the first) begins with a capital letter.
So, about lowerCamelCase, this thing has been something lingered in my mind for a while. I just didn’t know what the right term to ask until I saw that instruction.
Upon googling few sites and reading upon [Camel Case]
(Camel case - Wikipedia) wiki, I can slightly comprehend how it arrive to current usage of Camel Case in programming.
But still, I am rather curious.
where each word (except the first) begins with a capital letter.
Coming from a person who has zero computing knowledge:
Is var myCountry, better than var MyCountry?
(Other than explanation I can think of: Capitalizing Each First Letter requires additional one “Shift” stroke? Thus less productive?)
Is it just a preference or is there any deeper explanation for the practice?
Maybe anyone have better understanding/idea or good links can share on this?
Upon reading further, I come across this PascalCase.
(Observation: I have noticed CC course is taught using lowerCamelCase over PascalCase, just got me very curious.)