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

Chapter 5. Classes in CoffeeScript

We're going to change gears for a bit in this chapter. We've been learning details of the CoffeeScript language and putting them to work in our pet store application. In this chapter, we'll take a step back and learn about a big concept: classes. We won't be working on the pet shop application in this chapter—instead we'll use small self-contained examples to explore how classes work. We haven't forgotten about the pet shop, though, and classes will certainly come in handy when we return to it!

In this chapter, we'll learn:

  • What a class looks like in CoffeeScript
  • How to attach functions and properties to it, and how to use them
  • How to use inheritance to build powerful class hierarchies
  • How all of this translates to ...

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