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

Summary

This chapter has taken the first major step in introducing the concepts of objects in JavaScript. As was seen, objects exist in a hierarchy in JavaScript, with the window object always being at the top of the heap. Everything else is a property of the window object in one way or another. Objects can be created by the designer/developer to add a needed element to a script, and these objects may have their own properties and values. Likewise, many of the built-in objects have their own properties that provide useful data for fine-tuning and customizing a script to address different configurations that viewers may have.

As you will see in the next chapter, objects are driven by their methods— functions associated with a particular object or one of an object’s properties. By generating scripts that take advantage of the objects’ properties and methods in JavaScript, you can create object-oriented programs. The advantage of object-oriented scripts is that they optimize the script’s execution and open up a whole different and important way of organizing and thinking about the use of JavaScript.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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