11 KiB
| title | chunk | source | category | tags | date_saved | instance |
|---|---|---|---|---|---|---|
| Camel case - Glossary | MDN | 1/3 | https://developer.mozilla.org/en-US/docs/Glossary/Camel_case | reference | web, html, css, javascript, documentation | 2026-05-05T05:26:54.142292+00:00 | kb-cron |
MDN HTML HTML: Markup language
HTML reference
HTML guides
Markup languages
CSS reference
CSS guides
Layout cookbook
JavaScriptJS JavaScript: Scripting language
JS reference
JS guides
Web APIs Web APIs: Programming interfaces
Web API reference
Web API guides
- Using the Web animation API
- Using the Fetch API
- Working with the History API
- Using the Web speech API
- Using web workers
Technologies
Topics
Learn Learn web development
Frontend developer course
- Getting started modules
- Core modules
- MDN Curriculum
- Check out the video course from Scrimba, our partner
Learn HTML
Learn CSS
Learn JavaScript
Tools Discover our tools
About Get to know MDN better
Camel case
Camel case is a way of writing phrases without spaces, where the first letter of each word is capitalized, except for the first letter of the entire compound word, which may be either upper or lower case. The name comes from the similarity of the capital letters to the humps of a camel's back. It's often stylized as "camelCase" to remind the reader of its appearance.
Camel casing is often used as a variable naming convention. The following variables are in camel case: console, encodeURIComponent, ArrayBuffer, and HTMLElement.
Note that if the phrase contains acronyms (such as URI and HTML), camel casing practices vary. Some prefer to keep all of them capitalized, such as encodeURIComponent above. This may sometimes lead to ambiguity with multiple consecutive acronyms, such as XMLHTTPRequest. Others prefer to only capitalize the first letter, as XmlHttpRequest. The actual global variable, XMLHttpRequest, uses a mix of both.
When the first letter of the entire phrase is upper case, it is called upper camel case or Pascal case. Otherwise, it is called lower camel case.
Camel case is the most popular convention in JavaScript, Java, and various other languages.
In this article
See also
- Related glossary terms:
- typescript-eslint rule:
naming-convention