January 2001
Beginner
312 pages
6h 4m
English
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:
computers.monitors cars.wheels scissors.cut()
Notice how this enables you to better describe ...
Read now
Unlock full access