(one good reason why
+ is the string
example, let’s consider a business card as an object we’ll call
card. This object contains properties such as a
properties would look like this:
card.name card.phone card.address
Its methods are functions that retrieve, change, and otherwise act
on the properties. For instance, to invoke a method that displays the
properties of object
card, you might
use syntax such as:
Have a look at some of the earlier examples in this chapter, where
document.write is used.
write is actually a method of
Figure 13-3. Example of DOM object hierarchy
The figure uses HTML tags ...