O'Reilly logo

Jump Start CoffeeScript by Earle Castledine

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required