Case Styles in development: Camel, Pascal, Snake, and Kebab Case

Alok Verma
2 min readApr 27, 2021
  • camelCase
  • PascalCase
  • snake_case
  • kebab-case

Camel Case (camelCase):

camelCase is a naming convention in which the first letter of each word in a compound word is capitalized, except for the first word. Software developers often use camelCase when writing source code.

camelCase is useful in programming since element names cannot contain spaces. The camelCase naming convention makes compound names more readable. For example, mySuperClass is easier to read than mysuperclass.

Pascal Case (PascalCase):

PascalCase

Pascal case combines words by capitalizing all words (even the first word) and removing the space, as follows:

Raw: my super class

Pascal Case: MySuperClass

This is also a very popular way to combine words to form a single concept. It is often used as a convention in declaring classes in many languages.

Snake Case (snake_case):

snake_case

Snake case combines words by replacing each space with an underscore (_) and, in the all caps version, all letters are capitalized, as follows:

Raw: my super class

Snake Case: my_super_class

Snake Case (All Caps): MY_SUPER_CLASS

Kebab Case (kebab-case):

kebab-case

Kebab case is the way to write compound words separated by hyphens (-) instead of using space. Generally, everything is written in lowercase. Example: “what-is-kebab-case”.

This writing style is widely used in SEO (Search Engine Optimization — technique used by software developers to optimize search engines) to create a “slug” in URLs. For example: www.xyx.com/home/user-profile

Fun Fact :At some point you have seen or used this style of writing and did not know it was the kebab case. :)

Happy Coding… ( ) => {}
Cheers !!!

--

--

Alok Verma

5 + Years JavaScript Development |React|Redux|React Native|Node| AWS | Angular