O'Reilly logo

CoffeeScript Application Development by Ian Young

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Inheritance

Inheritance is a powerful concept that many modern programming languages use extensively. JavaScript has never embraced it wholeheartedly, in large part because implementing it has always been slightly awkward and error-prone due to some omissions in the JavaScript language. Thankfully, CoffeeScript patches up those holes and makes inheritance a first-class experience again.

Note

Inheritance is used to define is-a relationships, such as "an Apple is a type of Fruit". Child classes (like Apple) inherit behavior from parent classes (like Fruit), while often adding more behavior or selectively modifying existing behavior. Inheritance can be chained through several generations, and a child inherits behavior from all of its ancestors, with ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required