FAQ: Control Flow - Putting It All Together

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:

  1. Remove the spaces between multiple words and make them all into a single word.
  2. The first word in lower case/small letters.
  3. 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)

https://www.codecademy.com/paths/code-foundations/tracks/learn-how-to-code/modules/bop-ii/lessons/bop-control-flow/exercises/control-all-together

2 Likes