Table of Contents

 

Copyright

Brief Table of Contents

Table of Contents

Preface

Acknowledgments

About this Book

About the Cover Illustration

1. Foundations

Chapter 1. The road to CoffeeScript

1.1. Why CoffeeScript?

1.2. Running CoffeeScript

1.3. JavaScript

1.3.1. C

1.3.2. Scheme

1.3.3. Self

1.4. Evolving JavaScript

1.4.1. A little story about language

1.4.2. The lesson for JavaScript

1.5. Creating CoffeeScript

1.5.1. Designing new syntax

1.5.2. Achieving new syntax

1.6. Summary

Chapter 2. Simplified syntax

2.1. Your first program

2.1.1. Comparing CoffeeScript to JavaScript

2.2. Simple expressions

2.2.1. Literal values

2.2.2. Variables

2.3. Operators

2.3.1. Essentials

2.3.2. Types, existential, and combining operators

2.3.3. Exercises

2.4. Statements

2.4.1. Anatomy

2.4.2. Statements as expressions

2.4.3. Pure statements

2.4.4. Exercise

2.5. Strings

2.5.1. Methods

2.5.2. Interpolation

2.5.3. Exercise

2.6. Arrays

2.6.1. length, join, slice, and concat

2.6.2. in

2.6.3. Ranges

2.6.4. Comprehensions

2.6.5. Exercise