DEV Community

aryan015
aryan015

Posted on

Types of casing in programming

note: for consistancy i will keep the same example.

1. camelCase

//userDate
//firstName
Enter fullscreen mode Exit fullscreen mode

2. snake_case

//user_name
//first_name
Enter fullscreen mode Exit fullscreen mode

3. PascalCase

//UserName
//FirstName
Enter fullscreen mode Exit fullscreen mode

4. kebab-case

This style mostly used as ID name and classes in html.

//user-name
//first-name
Enter fullscreen mode Exit fullscreen mode

my linkedin

Top comments (5)

Collapse
 
jonrandy profile image
Jon Randy 🎖

kebab-case

Collapse
 
aryan015 profile image
aryan015

though most popular programming languages does not allow dashing in naming

Collapse
 
jonrandy profile image
Jon Randy 🎖

That's correct. It's most often used in CSS class names, and HTML attribute names

Thread Thread
 
aryan015 profile image
aryan015

ok corrected.

Collapse
 
aryan015 profile image
aryan015

ok i will remember that ty