Part 1. Objects
The journey to discovering what makes JavaScript a joy to code with starts with its object system. Objects are the foundation for everything you do and everything you will be able to do with the language. Object design is used to make sense of your domain and how all its pieces relate and pass messages to one another. As powerful as the object system is, however, it can be quite stressful to figure out which patterns to use—a task that everyone seems to do slightly differently. We can catalog patterns based on two groups: prototypal and delegation. This part gives you an overview of each pattern and its strengths.
In chapter 2, we start by reviewing JavaScript’s prototype mechanism. Anything meaningful you do with JavaScript ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access