From c7cb308b6dab49add9c357bb3da7f1f38c6e16c7 Mon Sep 17 00:00:00 2001
From: Jeremy Ashkenas
+ If you prefer not to use blocks, you'll need to add a pair of parentheses + to help distinguish the arguments from the definition of the function: + _.map(array, (num => num * 2)) +
Embedded JavaScript - If you ever need to interpolate literal JavaScript snippets, you can - use backticks to pass JavaScript straight through. + Hopefully, you'll never need to use it, but if you ever need to intersperse + snippets of JavaScript within your CoffeeScript, you can + use backticks to pass it straight through.
<%= code_for('embedded', 'hi()') %> diff --git a/index.html b/index.html index 63bfc390..6060bc0f 100644 --- a/index.html +++ b/index.html @@ -1119,11 +1119,17 @@ tom.move(); }); });+ If you prefer not to use blocks, you'll need to add a pair of parentheses + to help distinguish the arguments from the definition of the function: + _.map(array, (num => num * 2)) +
Embedded JavaScript - If you ever need to interpolate literal JavaScript snippets, you can - use backticks to pass JavaScript straight through. + Hopefully, you'll never need to use it, but if you ever need to intersperse + snippets of JavaScript within your CoffeeScript, you can + use backticks to pass it straight through.
hi: `function() { return [document.title, "Hello JavaScript"].join(": "); @@ -1285,7 +1291,7 @@ world...";0.2.3 Axed the unsatisfactory ino keyword, replacing it with of for - object comprehensions. They now look like: for key, value of object. + object comprehensions. They now look like: for prop, value of object.