Curriculum
Course: JavaScript Basic
Login

Curriculum

JavaScript Basic

JSHome

0/216
Text lesson

JavaScript Identifiers

All JavaScript variables necessitate distinct names, referred to as identifiers.

These identifiers can be concise, like x and y, or descriptive, such as age, sum, and totalVolume.

The fundamental guidelines for constructing variable names (identifiers) are as follows:

  • Names can include letters, digits, underscores, and dollar signs.
  • Names must commence with a letter.
  • Names may also start with $ and _ (though not utilized in this tutorial).
  • Identifiers are case sensitive (e.g., y and Y denote different variables).
  • Reserved words, such as JavaScript keywords, are ineligible for use as names.

Note

Variables serve as containers for storing values.

In JavaScript, identifiers are sensitive to case.