Here's a simple example (based on an example in the jQuery Template documentation):
How can CoffeeScript make this better?
Enter Heredoc and String Interpolation...
Heredoc: Heredocs allow you to specify multi-line, formatted text. This can be useful when defining the template markup.
With heredocs, the markup from the previous example changes to this:
String Interpolation: CoffeeScript also provides Ruby style string interpolation. Here's an example of the markup after taking advantage of the string interpolation feature (Note: String interpolation only occurs within double-quoted strings and double-quoted heredocs):
Want to see it in action?