Summary
In this chapter, we learned:
How the value of
this
can change in a method body, and how to use fat arrows to get the behavior we want.How to use memoization to save and retrieve the results of expensive computation rather than repeating it.
How to use options objects to clean up our method signatures and easily set defaults.
This chapter was a graduation of sorts. You're now extremely well-versed in the CoffeeScript language! You've learned almost all of the syntax, including some fairly advanced tools and tricks. The next few chapters are all about using CoffeeScript to accomplish more, better. First up is a very common paradigm in web development: dealing with asynchronous operations.