What are the variable naming conventions defined while coding? Rules for variable names formed by combinations of 2 or more words;
|Camel Case (Lower Camel Case, Dromedary Case)||camelCase|
|Kebab Case (Dash Case, Lisp Case, Spinal Case)||kebab-case|
|Snake Case (Pothole Case)||snake_case|
|Pascal Case (Upper Camel Case, Studly Case)||PascalCase|
|Upper Flat Case||UPPERFLATCASE|
|Screaming Snake Case (Macro Case, Constant Case)||SCREAMING_SNAKE_CASE|
|Camel Snake Case||camel_Snake_Case|
|Pascal Snake Case||Pascal_Snake_Case|
|Train Case (HTTP Header Case)||Train-Case|
|Cobol Case (Screaming Kebab Case)||COBOL-CASE|
It is also known as camel case, lower camel case and dromedary case, which is one of the most used variable definition formats.
The first letter of the first word of the variable name to be formed by the combination of 2 or more words is written adjacently, with the first letter of the second word capitalized.
The variant created is called camel case because it resembles a camel’s back in shape.
It is also known as kebab case, dash case, lisp case, spinal case, which is another common naming convention structure.
It is written by separating the words of the variable name to be created with a “-” character.
This structure is called kebab case because it resembles a kebab with a bottle. This structure has multiple names, but it is most commonly known as the kebab case.
Another widely used code convention structure, the snake case is also known as the pothole case.
It is written by separating the words or characters that will make up the variable name with a “_” character.
Flat case is a variable convention structure created by combining the characters or words that make up the variable with lowercase letters as they are.
It is formed by combining the words that make up the variable side by side so that the first letters are capitalized. Although more commonly known as pascal case, it is also known as upper camel case and studly case.
It is formed by using all letters of the words as capital letters and combining them while defining the variable.
It is formed by using all capital letters of the words that make up the variable name and combining them with an underscore (_). Although it is generally known as the screaming snake case, it is also known as the macro case and constant case.
The camel snake case, which is a combination of the snake case and camel case rules, is formed by using the first letter of the first word of the words that make up the variable, lowercase the first letter of the other words, and separating these words with an underscore (_).
Pascal snake case, which is formed by the combination of snake case and pascal case rules, is formed by capitalizing the first letters of the words that make up the variable and separating these words with an underscore (_).
The train case, which is formed by the combination of kebab case and pascal case rules, is also known as HTTP header case. It is formed by capitalizing the first letters of the words that make up the variable and separating these words with a hyphen (-).
The cobol case, which is a combination of the upper flat case and the kebab case rules, is also known as the screaming kebab case. The words that make up the variable name are all capitalized and separated by a hyphen (-).
Camel case, pascal case