Because of camelCase
camelCase: showDetails()
normal/original word: show details
For single word, one can go with lower case(here the square)
function square{
//statements
}
In Javascript, We follow this for naming variables, methods, and functions etc. Javascript follows camelCase style naming convention for multiple words.
camelCase Rules:
- Remove the spaces between multiple words and make them all into a single word.
- The first word in lower case/small letters.
- Capitalize the only first letter of each following word
Original word/Raw word: Putting It All Together
camelCase: puttingItAllTogether
Other style types:
- PascalCase (first letter capital in every word)
- snake_case (underscore between words)
- SNAKE_CASE (ALL CAPS)
- kebab-case (dash between words)