• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Hour 4. How JavaScript Programs Work > Understanding Objects

Understanding Objects

In Hour 2,“Creating a Simple Script,” you learned that variables are containers that can store a number, a string of text, or another value. JavaScript also supports objects. Like variables, objects can store data—but they can store two or more pieces of data at once.

The items of data stored in an object are called the properties of the object. As an example, you could use objects to store information about people as in an address book. The properties of each person object might include a name, address, and other information.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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