So far, we have created objects that just contain data. Objects that just contain data are sometimes known as records—they store data, but they don’t do anything. In Chapter 11, we wrote functions that manipulated these records. If you want to perform an action (such as withdrawing funds from an account), you would call the appropriate function, and it would do what you want. This is a fine programming style and works well for many situations. However, as programs get larger and more complex, it is beneficial ...
15. Intermediate Objects
Get Programming for Absolute Beginners: Using the JavaScript Programming Language now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.