You’ve seen how prototypes allow a set of objects to share common functionality and how CoffeeScript’s classes provide a useful syntax for bundling prototype properties together. And if that were all classes did, they’d be fairly useful. But where classes really shine is when we want to share properties between objects with distinct but related types, a process called inheritance.
|||c = new C|
First, the runtime checks to see whether the particular C instance, c, has a property flurb; if not, it checks C’s prototype (B). If that’s ...