Identifiers

An identifier is the name of a variable, function, property, or function argument. The following two rules apply to Javascript identifiers:

The first character must be a letter, an underscore (_), or a dollar sign ($). All other characters may be letters, underscores, dollar signs, or numbers.

The camel case is recommended. The first letter of the camel case is lowercase and each letters in the additional words are uppercase:

 
<!DOCTYPE HTML>
<html>
<head>
<title>Example</title>
  <script type="text/javascript">
      var firseName = 'firseName';
      var thisIsAnotherVariable = 'this Is Another Variable';
    document.writeln(firseName);
    document.writeln(thisIsAnotherVariable);
  </script>
</head>
<body>
</body>
</html>
  
Click to view the demo
Home 
  JavaScript Book 
    Language Basics  

Language Basics:
  1. Case-sensitivity
  2. Identifiers
  3. Comments
  4. Strict Mode
  5. Statements
  6. Keywords And Reserved Words
  7. Variables