File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ _The following people are totally rad and awesome because they have contributed
99
1010* David Brady _ratgeyser@gmail.com_
1111* John Ford _jwford@gmail.com_
12+ * Steven Reid _steven @ reidnorthwest . com_
1213* ...You! What are you waiting for? Check out the <a href="/contributing">contributing</a> section and get cracking!
1314
1415
Original file line number Diff line number Diff line change @@ -6,19 +6,20 @@ chapter: Syntax
66
77h2. Problem
88
9- You want to include some found/pre-written JavaScript code inline with your CoffeeScript
9+ You want to include some found/pre-written JavaScript code inline with your CoffeeScript.
1010
1111h2. Solution
1212
1313Wrap the JavaScript with backticks:
1414
1515{% highlight coffeescript %}
1616`function greet(name) {
17- alert( "Hello "+name) ;
17+ return "Hello "+name;
1818}`
1919
2020# Back to CoffeeScript
2121greet "Coffee"
22+ # => "Hello Coffee"
2223{% endhighlight %}
2324
2425h2. Discussion
@@ -27,9 +28,10 @@ This is a simple way to integrate small snippets of JavaScript code into your Co
2728
2829{% highlight coffeescript %}
2930hello = `function (name) {
30- alert( "Hello "+name)
31+ return "Hello "+name
3132}`
3233hello "Coffee"
34+ # => "Hello Coffee"
3335
3436{% endhighlight %}
3537Here the "hello" variable is still in CoffeeScript, but is assigned a function written in JavaScript.
You can’t perform that action at this time.
0 commit comments