You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
itsgreggreg edited this page Sep 21, 2015
·
1 revision
What is Camel Case?
Camel Case is simply a convention for naming things like variables and functions in computer programming.
Sometimes we want to use multiple words to name things and since we cannot use spaces when naming things, we instead put all the words together and capitalize the first letter of every word except the first. Like so:
// This is an invalid variable name in Javascriptvarnumberofpeople;// Because names can't have spaces.// So instead we use camel case: numberOfPeople// ┌ First word lowercase// ⇣ ┌-┌- All other words uppercasevarnumberOfPeople;// more examples:vardaysOfTheWeek;functiontwoTimesTwo(){return2*2;}