From 7afadb01811e1fb97a928a0e2d8b1a3b7a3a42f6 Mon Sep 17 00:00:00 2001 From: Kaleb Davis Date: Tue, 6 Oct 2015 21:31:07 -0400 Subject: Fix indentation to make compiled JS more readable --- coffeescript.html.markdown | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'coffeescript.html.markdown') diff --git a/coffeescript.html.markdown b/coffeescript.html.markdown index 4c080bc6..a198f40d 100644 --- a/coffeescript.html.markdown +++ b/coffeescript.html.markdown @@ -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' -- cgit v1.2.3 From 960ee4a1856db8eadb96277bb2422edfa8f2a81c Mon Sep 17 00:00:00 2001 From: Gabriel Halley Date: Wed, 7 Oct 2015 23:11:24 -0400 Subject: removing whitespace all over --- coffeescript.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'coffeescript.html.markdown') diff --git a/coffeescript.html.markdown b/coffeescript.html.markdown index 4c080bc6..85a5f81f 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. @@ -73,7 +73,7 @@ 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 = []; -- cgit v1.2.3 From a67d9d9e0ed3d351ce0139de18a4b212b47ab9cb Mon Sep 17 00:00:00 2001 From: Andy B Date: Fri, 9 Oct 2015 15:36:51 +0100 Subject: [coffeescript/en] Fixed grammar --- coffeescript.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'coffeescript.html.markdown') diff --git a/coffeescript.html.markdown b/coffeescript.html.markdown index 85a5f81f..106854bd 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. -- cgit v1.2.3