Frequently Asked Questions
What is camelCase and when is it used?
camelCase joins words with no spaces, writes the first word in lower case and starts every following word with a capital, as in firstName or getUserById. It is the usual style for variables and functions in JavaScript, TypeScript and Java.
What is the difference between snake_case and kebab-case?
Both join words without spaces. snake_case uses underscores (user_id) and is the convention for variables in Python and Ruby and for many database column names. kebab-case uses hyphens (user-id) and is common in URLs, file names and CSS class names. Most programming languages cannot use kebab-case for variable names, because the hyphen means minus.
How do I convert text to title case online?
Paste your text into the box and choose Title Case. Every word starts with a capital except short joining words such as a, an, the, and, or, of, in and to, which stay lower case unless they start the text. Style guides differ on the details, so check names and acronyms afterwards.
What is CONSTANT_CASE used for?
CONSTANT_CASE is all capitals with underscores between words, as in MAX_RETRIES or API_BASE_URL. It marks values that should not change, such as constants in code and environment variable names.