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

Chapter 9. Getting the Most Out of Objects > Objects—What Are They?

Objects—What Are They?

In their simplest terms, objects are collections of methods and properties. Remember the analogy that objects are things. Objects have properties (such as computers have monitors, cars have wheels, and so on), and methods are things that objects can do (cars can move, scissors can cut, and so on).

If you put objects, properties, and methods together, you start to get a better idea of what objects are. In JavaScript, objects and their respective properties and methods are put together by separating them with periods (.), which is called dot syntax. So, if the real world was controlled by JavaScript, you might have the following:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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