Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The designers of JavaScript were very smart. Rather than just creating yet another scripting language (which would have still been a pretty good improvement at the time), they had the vision to build it around the Document Object Model or DOM. This breaks down the parts of an HTML document into discrete objects, each with its own properties and methods, and each subject to JavaScript’s control.
JavaScript separates objects, properties, and methods using a period (one good reason why + is the string concatenation operator in JavaScript, rather than the period). For example, let’s consider a business card as an object we’ll call card. This object contains properties such as a name, address, phone number, and so on. In the syntax of JavaScript, these properties would look like this: