The Snap-Together Language
Figure 1.5. The cat object (this one's name is Pixel).
Because you can have more than one cat, or more than one window, it makes sense to give them names. While you could refer to your pets as Cat #1 and Cat #2, it's a bad idea for two reasons: first, it's easier to tell the cats apart if they have unique names, and second, it's just plain impolite. In the same way, all the examples in this book will give objects their own unique names.
Changing a property of an object modifies that object, and the same property name can be a part of completely different objects. Let's say that you have a property called empty. It's okay to use empty wherever it applies, so you could say that both the cat's tummy is empty and the cat's bowl is empty.
Note that the computer's keyboard and the bicycle's wheels aren't only properties; they are also objects in their own right, which can have their own properties. So objects can have sub-objects.
Putting the pieces together
bicycle.wheels cat.paws.front.left computer.disk.floppy document.images.name window.status
cat.purr() document.write() forms.elements.radio.click()
Introducing the Document Object Model
Figure 1.7. You can see a document's tree structure using the DOM Inspector, which is part of Firefox; there are similar features in Safari and Internet Explorer.