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

Constants

A constant is a fancy word for a number or string of characters that never changes. Examples are 2, 2.71828, "message", and 'communication'. The last two are called string constants. In ECMA Script, you can use either single or double quotes to mark the boundaries of a string. This is good if you ever need to write things like "O'Reilly & Associates" or 'There is no "there" there.'.

You will sometimes see the two Boolean constants true and false, which are used for “yes-or-no” situations.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint