The following names are all valid variable names in nearly every programming language: dogName dog_name dog-name Snake case, also known as “underscore case,” uses underscores to separate words in a variable or function name.

Like camel case, Pascal case can be harder to read than snake case because of the lack of separators between words.

Some programmers prefer Pascal case for this reason, while others find it less readable than camel case or snake case.

However, some programming languages do not allow hyphens in variable names, so you may need to use a different naming convention if you’re working in one of these languages.

Related Articles