November 2014
Beginner
500 pages
9h 20m
English
Object-oriented programming (OOP for short) is a style of programming that involves separating the code into objects that have properties and methods. Sound familiar? JavaScript obviously supports objects, as we saw in Chapter 5, so it also supports an object-oriented style of programming. In this chapter, we’ll look at what object-oriented programming is and how to implement it in JavaScript.
In this chapter, we’ll cover the following topics:
an introduction to OOP
constructor functions
prototypes
public and private methods
inheritance
creating objects from objects
adding methods to built-in objects
mixins
chaining functions
this and that
borrowing methods from prototypes
our project―create ...
Read now
Unlock full access