summaryrefslogtreecommitdiffhomepage
path: root/coffeescript.html.markdown
diff options
context:
space:
mode:
authorCameron Schermerhorn <Cameron.Schermerhorn@its.ny.gov>2015-10-09 13:30:07 -0400
committerCameron Schermerhorn <Cameron.Schermerhorn@its.ny.gov>2015-10-09 13:30:07 -0400
commitd2010c08604c25b3166977e0cde795732ecde551 (patch)
treed4d6d72b9364e85decc55770e1f451f479321b67 /coffeescript.html.markdown
parentbf7d33037f64ea9f80f106a37929e3fdf20bd24d (diff)
parentea943b61fbee8fb0ba34f88b4d0380400e890f30 (diff)
Merge remote-tracking branch 'refs/remotes/adambard/master'
Conflicts: java.html.markdown
Diffstat (limited to 'coffeescript.html.markdown')
-rw-r--r--coffeescript.html.markdown34
1 files changed, 17 insertions, 17 deletions
diff --git a/coffeescript.html.markdown b/coffeescript.html.markdown
index 4c080bc6..f19181ce 100644
--- a/coffeescript.html.markdown
+++ b/coffeescript.html.markdown
@@ -6,7 +6,7 @@ contributors:
filename: coffeescript.coffee
---
-CoffeeScript is a little language that compiles one-to-one into the equivalent JavaScript, and there is no interpretation at runtime.
+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.
See also [the CoffeeScript website](http://coffeescript.org/), which has a complete tutorial on CoffeeScript.
@@ -54,35 +54,35 @@ 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?
#=> if(typeof elvis !== "undefined" && elvis !== null) { alert("I knew it!"); }
# Array comprehensions:
-cubes = (math.cube num for num in list)
+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'