Sally the Camel has…One Hump

Unwritten rules…every organization, every industry has them. Some ‘rebels’ asky why we do them. Sometimes there is a good reason and sometimes there is not. Today I would like to discuss a standard naming convention in programming, particularly when it comes to variables. This convention is entitled, ‘Camel Case’.

Here is an example of a variable utilizing camel case…

[code lang=”js”]
var myVar;
[/code]

Camel case is when you capitalize the first letter of the second word in a compound word. If it were not a compound word, it should be all lowercase. Specifically, this is called lower camel case. Upper camel case is when you capitalize the first letter of every word. Lower camel case is the standard.

Now, do you have to do this to get your programming to work? In most cases, no, but it is a standard. Why? Mostly for human readability. It is a lot easier for our human eyes to read through code and see these and understand them.

So, if you are not using camel case, begin using it in your code today and make your code easier to read.

Happy coding!

Clay

More To Explore

Digital interface displaying code aligned with golden ratio in a dark futuristic room with glowing screens at a tech hub
Code

Unleashing Creativity with the Canvas API

The Canvas API stands as one of the web’s most powerful tools for creating dynamic, interactive graphics. Unlike SVG, Canvas operates at the pixel level, making it ideal for games, data visualizations, and real-time graphics processing. With a simple HTML element and JavaScript, developers can create everything from basic shapes to complex animations that push the boundaries of what’s possible in the browser.

Developer working with styles at a coffeehouse with code swirling around him
Code

The CSS Object Model (CSSOM): A Practical Guide

If you’ve ever used JavaScript to read or modify styles in the browser, you’ve touched the CSS Object Model—often without realizing it. The CSSOM sits

Share This Post

small_c_popup.png

Need help?

Let's have a chat...


Login

Jump Back In!

Here at Webolution Designs, we love to learn. This includes sharing things we have learned with you. 

Register

Begin Your Learning Journey Today!

Come back inside to continue your learning journey.