Javascript identifiers

Introduction

Javascript is case-sensitive.

All 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.

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.

Letters in an identifier may include extended ASCII or Unicode letter characters.

By convention, Javascript identifiers use camel case.

firstSecond
myLanguage
doSomethingImportantThisWeekend

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




PreviousNext

Related