Summary

We've covered a lot of ground in this chapter. We learned:

  • How to use variables.
  • How to call functions.
  • How to use if/else statements and their counterpart, unless.
  • How to use natural-language aliases to make our comparison statements more readable.
  • How to declare arrays, and iterate through their contents in a number of different ways.
  • How to declare and iterate over objects.

Not only did we learn about all those things, but we made sure to avoid a few common mistakes, and learned why it was possible to make those mistakes. We've compared many of the CoffeeScript statements to the compiled JavaScript, so hopefully you're developing a good mental map of how CoffeeScript translates to JavaScript.

Now that we've got a solid handle on the basics, ...

Get CoffeeScript Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.