Chapter 2. Writing Your First Lines of CoffeeScript

In this chapter, we will dive into CoffeeScript headfirst. We'll look at all the simple data types and control structures, and find out how CoffeeScript helps us deal with them more simply and expressively. We'll discover some neat tricks that save us keystrokes and reduce the likelihood of errors in our code. And we'll peek under the hood to see how some of the CoffeeScript magic is happening.

In this chapter, you can expect to:

  • Learn CoffeeScript syntax for many common operations
  • Learn how to use standard data types and control structures in CoffeeScript
  • See how the CoffeeScript we write maps back to JavaScript once compiled

Following along with the examples

I implore you to open up a console as ...

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.