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

Values and Variables

In JavaScript, a piece of information is a value. There are different kinds of values; the kind you're most familiar with are numbers. A string value is a word or words enclosed in quotes. Other kinds of JavaScript values are listed in Table 1.2.

Table 1.2. Value Types
Type Description example
NumberAny numeric value3.141592654
StringCharacters inside quote marks "Hello, world!"
BooleanTrue or Falsetrue
NullEmpty and meaningless 
ObjectAny value associated with the object 
FunctionValue returned by a function 



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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