How to create Identifiers in Javascript

Description

Everything in Javascript is case-sensitive.

variables, function names, and operators are all case-sensitive.

A variable named test is different from a variable named Test.

Identifiers

An identifier is the name of a variable, function, property, or function argument.

Javascript identifiers may be one or more characters in the following format:

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

By convention, Javascript identifiers use camel case, for example,


firstName
myVariable
yourFunctionName

Keywords, reserved words, true, false, and null cannot be used as identifiers.





















Home »
  Javascript »
    Javascript Introduction »




Script Element
Syntax
Data Type
Operator
Statement
Array
Primitive Wrapper Types
Function
Object-Oriented
Date
DOM
JSON
Regular Expressions