Chapter 1Getting Started

CoffeeScript is a programming language that looks like this:

hello = (name) ->
  alert "Hello, #{name}!"

hello "World"

Here, we’re defining and then calling a function, hello, which accepts a single parameter, name, and is displayed in an annoying fashion on the screen (via alert). If you’re a coder, you’ve probably identified a few interesting elements in this piece of code. Indeed, one of this book’s goals is to thoroughly explore the syntactic and pragmatic choices that make CoffeeScript an interesting programming language.

CoffeeScript occupies a weird space in the programming language landscape: it was designed from the beginning to piggyback on top of JavaScript, the de facto language of the Web. CoffeeScript code ...

Get Jump Start CoffeeScript now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.