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
Share this Page URL
Help

Hour 5. Data Communication with the Serv... > Using Object Literals to Store Name/...

Using Object Literals to Store Name/Value Pairs

Objects are defined to store name/value pairs. You can create this basically to store a business entity in the form of an object. The name/value pairs are enclosed between curly braces ({ and }). The names and values in each pair are separated by :, and each of the name/value pairs are separated by ,. An example of an Item object is as follows:

var objItem = {
        "Name" : "HP",
        "Model" : "5446 A",
        "Make" : "2007",
        "Price" : "$ 896.00"
};


  

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


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint