Skip to content
svicalifornia edited this page Nov 22, 2014 · 7 revisions

The Basics

CoffeeScript.org has tons of examples of CoffeeScript code side-by-side with its corresponding JavaScript (so you can see how much code you'll save).

JavaScript: The Good Parts

CoffeeScript compiles to JavaScript, so it's important to understand the good and bad parts of JavaScript when working with CoffeeScript. See our JavaScript guide.

CoffeeScript resolves some of the bad parts of JavaScript. For example, CoffeeScript adds var to variable names when compiling to JavaScript, so you don't need to worry about accidental global variables. (Use window.SomeNamespace = { ... } to define a global variable namespace in web browsers.) Also, == and != in CoffeeScript compile to === and !== in JavaScript, so you don't have to worry about that. See more details in the Little Book of CoffeeScript, below.

Little Book of CoffeeScript

To dive deeper into how to use classes, comprehensions, and other concepts, read the quick Little Book of CoffeeScript.

Additional Recipes

CoffeeScript Cookbook

Clone this wiki locally