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

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

πŸ‘₯ Ideal for solo developers, teams, and cross-company projects

Learn more