Skip to main content

Command Palette

Search for a command to run...

Enough JavaScript to get you Started : #5 Naming Conventions

Updated
β€’3 min read
Enough JavaScript to get you Started : #5 Naming Conventions

What are conventions?

πŸ‘‰ Coding conventions are a set of guidelines for a specific programming language that recommend programming style, practices, and methods for each aspect of a program written in that language.These are guidelines for software structural quality.

PascalCase

PascalCase is a naming convention in which the first letter of each word in a compound word is capitalized. Software developers often use PascalCase when writing source code to name functions, classes, and other objects.
πŸ‘‰ Example :

var UserName = "Adarsh";

camelCase πŸͺ

camelCase describes the practice of writing phrases such that each word or abbreviation in the middle of the phrase begins with a capital letter, without intervening spaces or punctuation.
πŸ‘‰ Example :

var userName = "Adarsh";

snake_case 🐍

Snake case is the practice of writing compound words in which the words are separated by one underscore character and no spaces. The first letter is either upper- or lowercase. It is commonly used in declaring variable names, function names, and sometimes computer’s filenames.
πŸ‘‰ Example :

var user_name = "Adarsh";

kebab-case 🍒

all letters are written in lower case and the words are separated by a hyphen or minus sign. The kebab notation is often used as a convention for naming filenames.
πŸ‘‰ Example :

var user-name = "Adarsh";

Let me know in comment section if you have any doubt or feedback. it's always worth to give time to thriving developer community :)

Keep Coding ❀

Hey , Let' Connect πŸ‘‹

Twitter / Github

Enough JavaScript to get you Started

Part 6 of 21

πŸ‘‰ want to start with js? but don't know where to? πŸ‘‰ found new JS syntax confusing? πŸ‘‰ want to start your career as JS dev? πŸ‘‰ learn frontend frameworks like React? here's the easy guide made with ❀.

Up next

Enough JavaScript to get you Started : #6 Operators

What is Operator? πŸ‘‰ An operator performs some operation on single or multiple operands (data value) and produces a result. For example 3 + 2, where + sign is an operator and 3 is left operand and 2 is right operand. + operator adds two numeric value...

More from this blog

Adarsh Pandya's Blog

23 posts

Sometimes I Write <Code/>, Sometimes <Code/> Writes Me :)