Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

14.4. Variables

No particular character identifies a variable in JavaScript as the dollar sign does in PHP. Instead, variables use the following naming rules:

  • A variable may include only the letters a-z, A-Z, 0-9, the $ symbol, and the underscore (_).

  • No other characters such as spaces or punctuation are allowed in a variable name.

  • The first character of a variable name can be only a-z, A-Z, $, or _ (no numbers).

  • Names are case-sensitive. Count, count, and COUNT are all different variables.

  • There is no set limit on variable name lengths.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial