Chapter 6. Functions and Arrays
In the previous chapter, you learned about inheritance and saw how to pass members onto child objects using classical, prototypal, deep copy, and mixin inheritance. As I noted at the end of that chapter, it's actually functions that are more often passed on to child objects. This is because common processes, as provided by a function, are frequently more useful than common data, as provided by members. In this chapter, I'll cover why you would want to use functions and how to take advantage of function inheritance. There are a lot of cool tricks to learn in this area and we'll take advantage of a lot of them in later chapters, as you'll see from the copious forward references. In other words, this is quite an important ...
Get JavaScript for Absolute Beginners 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.