Naming Variables

  • Remember that we declare a new variable by typing the let keyword and then assigning a name to the variable.
  • A variable’s name is also known as an identifier.
  • In JavaScript, variables must be identified with a unique identifier.

    let blank;
    
  • The identifier of the variable in the above example is “blank”.

  • There are a few rules in regards to assigning variables’ identifiers (in other words, rules for naming variables in JavaScript).

Naming Variables Remember that we declare a new variable by typing the let keyword and then assigning a name to the variable. A variable’s name is also known as an identifier. In JavaScript, variables must be identified with a unique identifier. let blank; The identifier of the variable in the above example is “blank”. There are a few rules in regards to assigning variables’ identifiers (in other words, rules for naming variables in JavaScript).