JavaScript does not have classes. But as in other languages, we would like to tell the interpreter that it should build our myCar object following a certain pattern or schema or blueprint – it would be quite tedious to create every car object from scratch, manually giving it the attributes and methods it needs every time we build it.
If we were to create 30 car objects based on the Car class in Java, this object-class relationship provides us with 30 cars that are able to drive and honk without us having to write 30 drive and honk methods.
How is this achieved in JavaScript? Instead of an object-class relationship, there is an object-object relationship.
Where in Java our myCar, asked to honk, says go look at this class over there, which is my blueprint, to find the code you need, JavaScript says go look at that other object over there, which is my prototype, it has the code you are looking...