Permalink
Browse files

fixed some errata - thanks to @wlmeurer

  • Loading branch information...
1 parent 7027c03 commit 5799126cf1ae00cd7168aa196ae9a9fae03f6b69 @maccman maccman committed Jun 20, 2011
Showing with 6 additions and 6 deletions.
  1. +3 −3 coffeescript/01_syntax.html
  2. +3 −3 coffeescript/chapters/01_syntax.md
@@ -51,7 +51,7 @@
<h2>Variables &amp; Scope</h2>
-<p>CoffeeScript fixes one of the major bugbears with JavaScript, global variables. In JavaScript, it's all too easy to accidentally declare a global variable by forgetting to include <code>var</code> before the variable assignment. CoffeeScript solves this by simply removing global variables. Behind the scenes, CoffeeScript wraps up scripts with a anonymous function, keeping the local context, and automatically prefixes all variable assignments with <code>var</code>. For example, take this simple variable assignment in CoffeeScript:</p>
+<p>CoffeeScript fixes one of the major bugbears with JavaScript, global variables. In JavaScript, it's all too easy to accidentally declare a global variable by forgetting to include <code>var</code> before the variable assignment. CoffeeScript solves this by simply removing global variables. Behind the scenes, CoffeeScript wraps up scripts with an anonymous function, keeping the local context, and automatically prefixes all variable assignments with <code>var</code>. For example, take this simple variable assignment in CoffeeScript:</p>
<p><span class="csscript"></span></p>
@@ -74,7 +74,7 @@
<h2>Functions</h2>
-<p>CoffeeScript removes the rather verbose <code>function</code> statement, and replaces it with a thin arrow: <code>-&gt;</code>. Functions can be one liners, or indented on multiple lines. The last expression in the function is implicitly returned. In other words, you don't need to use the <code>return</code> statement unless you want to return earlier inside the function.</p>
+<p>CoffeeScript removes the rather verbose <code>function</code> statement, and replaces it with a thin arrow: <code>-&gt;</code>. Functions can be one liners or indented on multiple lines. The last expression in the function is implicitly returned. In other words, you don't need to use the <code>return</code> statement unless you want to return earlier inside the function.</p>
<p>With that in mind, let's take a look at an example:</p>
@@ -96,7 +96,7 @@
<h3>Function arguments</h3>
-<p>How about specifying arguments? Well, CoffeeScript lets you do that by specifying arguments in a pair of parenthesis before the arrow.</p>
+<p>How about specifying arguments? Well, CoffeeScript lets you do that by specifying arguments in parentheses before the arrow.</p>
<p><span class="csscript"></span></p>
@@ -26,7 +26,7 @@ As I briefly alluded to, whitespace is significant in CoffeeScript. In practice,
##Variables & Scope
-CoffeeScript fixes one of the major bugbears with JavaScript, global variables. In JavaScript, it's all too easy to accidentally declare a global variable by forgetting to include `var` before the variable assignment. CoffeeScript solves this by simply removing global variables. Behind the scenes, CoffeeScript wraps up scripts with a anonymous function, keeping the local context, and automatically prefixes all variable assignments with `var`. For example, take this simple variable assignment in CoffeeScript:
+CoffeeScript fixes one of the major bugbears with JavaScript, global variables. In JavaScript, it's all too easy to accidentally declare a global variable by forgetting to include `var` before the variable assignment. CoffeeScript solves this by simply removing global variables. Behind the scenes, CoffeeScript wraps up scripts with an anonymous function, keeping the local context, and automatically prefixes all variable assignments with `var`. For example, take this simple variable assignment in CoffeeScript:
<span class="csscript"></span>
@@ -47,7 +47,7 @@ In the root context, `this` is equal to the global object, and by creating a loc
##Functions
-CoffeeScript removes the rather verbose `function` statement, and replaces it with a thin arrow: `->`. Functions can be one liners, or indented on multiple lines. The last expression in the function is implicitly returned. In other words, you don't need to use the `return` statement unless you want to return earlier inside the function.
+CoffeeScript removes the rather verbose `function` statement, and replaces it with a thin arrow: `->`. Functions can be one liners or indented on multiple lines. The last expression in the function is implicitly returned. In other words, you don't need to use the `return` statement unless you want to return earlier inside the function.
With that in mind, let's take a look at an example:
@@ -67,7 +67,7 @@ As mentioned earlier, there's no reason why the we can't use multiple lines, as
###Function arguments
-How about specifying arguments? Well, CoffeeScript lets you do that by specifying arguments in a pair of parenthesis before the arrow.
+How about specifying arguments? Well, CoffeeScript lets you do that by specifying arguments in parentheses before the arrow.
<span class="csscript"></span>

0 comments on commit 5799126

Please sign in to comment.