Professional Documents
Culture Documents
What Is Camelcase
What Is Camelcase
snake_case?
1 minute read
Since we cannot define a variable like fruits in basket because many (or maybe all) programming
languages will interpret the space character as the end of the identifier and the beginning of something
else, we need to do something like fruitsInBasket.
Camel, pascal, kebab and snake case (and others) are all naming conventions that we use in computer
programming to be able to create compound names for variables, types, functions, clases and other
structures in source code.
camelCase
The rules are that we capitalize all the words after the first one.
Raw camelCase
is visible isVisible
PascalCase
Here we need to capitalize all the words including the first one.
HTML5 attributes can start with data- like data-name. Also, CSS uses dashes in property-names like
background-color.
snake_case
In contrast to the kebab case, for the snake case we add an underscore instead.