4 Standard naming conventions in Programming

4 Standard naming conventions in Programming

Do you know the standard naming conventions in Programming? ????

???? Here are some of the most popular ones:

  • ???? Camel Case: "camelCase"
  • ???? Snake Case: "snake_case"
  • ???? Kebab Case: "kebab-case"
  • ???? Pascal Case: "PascalCase"

 

Camel Case:

In the camel case, each word in a compound identifier is capitalized except for the first word, which starts with a lowercase letter.

The name is written without spaces, and the first letter of each subsequent concatenated word is capitalized.

Example: ????

"camelCase"

 

Snake Case:

In snake case, words are written in lowercase letters, and spaces are replaced with underscores ("_").

Example: ????

"snake_case"

 

Kebab Case:

In the kebab case, words are written in lowercase letters, and spaces are replaced with hyphens ("-").

Example: ????

"kebab-case"

 

Pascal Case:

In Pascal's case, each word in a compound identifier starts with an uppercase letter, including the first word.

The name is written without spaces.

Example: ????

"PascalCase"

 

These naming conventions are commonly used in programming languages for variables, functions, components, and other identifiers to enhance readability and maintain consistency within codebases.

 

Which one do you use the most? ????

???? In JavaScript/ReactJS: "PascalCase" & "camelCase"

???? In Python: " snake_case" & "PascalCase"

 

Here is another Quick guide: ????

4 Ways Check if the value is a number in JavaScript

 

Our Coding guides: 

Leave a comment

All comments are moderated before being published.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.