summaryrefslogtreecommitdiffhomepage
path: root/coffeescript.html.markdown
diff options
context:
space:
mode:
authorZachary Ferguson <zfergus2@users.noreply.github.com>2015-10-15 14:48:59 -0400
committerZachary Ferguson <zfergus2@users.noreply.github.com>2015-10-15 14:48:59 -0400
commit65bb71f4bde383a4d0b8cd6fd49901bb6e2cfa5f (patch)
tree03802f50ac31b295ace0585ccb6bc1ea6ef9b612 /coffeescript.html.markdown
parenta4ea3961744c3c1ee6fcf654f011caa8dbadf56e (diff)
parent68953bd9d97328b8660dad06edd8acb8ff330ede (diff)
Merge remote-tracking branch 'refs/remotes/adambard/master'
Conflicts: c.html.markdown
Diffstat (limited to 'coffeescript.html.markdown')
-rw-r--r--coffeescript.html.markdown32
1 files changed, 16 insertions, 16 deletions
diff --git a/coffeescript.html.markdown b/coffeescript.html.markdown
index 85a5f81f..89a29677 100644
--- a/coffeescript.html.markdown
+++ b/coffeescript.html.markdown
@@ -7,7 +7,7 @@ filename: coffeescript.coffee
---
CoffeeScript is a little language that compiles one-to-one into the equivalent JavaScript, and there is no interpretation at runtime.
-As one of the succeeders of JavaScript, CoffeeScript tries its best to output readable, pretty-printed and smooth-running JavaScript codes working well in every JavaScript runtime.
+As one of the successors to JavaScript, CoffeeScript tries its best to output readable, pretty-printed and smooth-running JavaScript code, which works well in every JavaScript runtime.
See also [the CoffeeScript website](http://coffeescript.org/), which has a complete tutorial on CoffeeScript.
@@ -54,19 +54,19 @@ math =
square: square
cube: (x) -> x * square x
#=> var math = {
-# "root": Math.sqrt,
-# "square": square,
-# "cube": function(x) { return x * square(x); }
-#}
+# "root": Math.sqrt,
+# "square": square,
+# "cube": function(x) { return x * square(x); }
+# };
# Splats:
race = (winner, runners...) ->
print winner, runners
#=>race = function() {
-# var runners, winner;
-# winner = arguments[0], runners = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
-# return print(winner, runners);
-#};
+# var runners, winner;
+# winner = arguments[0], runners = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
+# return print(winner, runners);
+# };
# Existence:
alert "I knew it!" if elvis?
@@ -75,14 +75,14 @@ alert "I knew it!" if elvis?
# Array comprehensions:
cubes = (math.cube num for num in list)
#=>cubes = (function() {
-# var _i, _len, _results;
-# _results = [];
+# var _i, _len, _results;
+# _results = [];
# for (_i = 0, _len = list.length; _i < _len; _i++) {
-# num = list[_i];
-# _results.push(math.cube(num));
-# }
-# return _results;
-# })();
+# num = list[_i];
+# _results.push(math.cube(num));
+# }
+# return _results;
+# })();
foods = ['broccoli', 'spinach', 'chocolate']
eat food for food in foods when food isnt 'chocolate'