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

Hour 9. Using Built-In Objects > What Is an Object?

What Is an Object?

As you know from earlier hours of this book, objects allow you to combine several kinds of data (properties) and functions to act on the data (methods) into a single, convenient package. In this hour, you'll learn more about the built-in Math and Date objects—but first, here's a quick overview of the way objects work in JavaScript.

Creating Objects

Each object has a special function, called a constructor, that's used to create objects. For example, JavaScript includes a built-in function called String to create String objects. That's why you can create a string variable like this:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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