Home > Articles > Programming > JavaScript

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

Wrapping Up

There you have it—everything you’ve ever wanted to know about functions in CoffeeScript! First we looked at how to define a simple function; in fact, we saw several ways to define a function in CoffeeScript. We then took a look at how arguments to functions are defined and how to call a function, including a recap of when and where you do and do not have to use parentheses when calling a function. We also took a look at default arguments, one of my favorite features of CoffeeScript.

Finally, we explored splats and how they help us write functions that take variable arguments.

With our nickel tour of functions and arguments over with, we can move on to the next stop, Chapter 5, “Collections and Iterations.” So go grab a cold one, and we’ll meet there. Ready?

  • + Share This
  • 🔖 Save To Your Account