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 From f05246ce39a8c3599eee7c69ad5abcf76ecec5fc Mon Sep 17 00:00:00 2001 From: Samantha McVey Date: Wed, 14 Dec 2016 15:51:22 -0800 Subject: Make the CoffeeScript introduction a little more informative --- coffeescript.html.markdown | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'coffeescript.html.markdown') diff --git a/coffeescript.html.markdown b/coffeescript.html.markdown index 89a29677..27aebe2c 100644 --- a/coffeescript.html.markdown +++ b/coffeescript.html.markdown @@ -12,9 +12,10 @@ As one of the successors to JavaScript, CoffeeScript tries its best to output re See also [the CoffeeScript website](http://coffeescript.org/), which has a complete tutorial on CoffeeScript. ```coffeescript -# CoffeeScript is a hipster language. -# It goes with the trends of many modern languages. -# So comments are like Ruby and Python, they use number symbols. +# CoffeeScript is a language which compiles to JavaScript. +# It attempts to try and make JavaScript more in line with the trends of many +# modern languages. +# Comments are similar to Ruby and Python, using the hash symbol `#` ### Block comments are like these, and they translate directly to '/ *'s and '* /'s -- cgit v1.2.3 From db8cc8bd782a08c88cfb7d293ffd8c30a53d9fbe Mon Sep 17 00:00:00 2001 From: Samantha McVey Date: Wed, 14 Dec 2016 15:53:36 -0800 Subject: Move the description to the beginning with the other text --- coffeescript.html.markdown | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'coffeescript.html.markdown') diff --git a/coffeescript.html.markdown b/coffeescript.html.markdown index 27aebe2c..2aae6966 100644 --- a/coffeescript.html.markdown +++ b/coffeescript.html.markdown @@ -6,15 +6,16 @@ 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. -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. +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 successors +to JavaScript, CoffeeScript tries its best to output readable, pretty-printed +and smooth-running JavaScript code, which works well in every JavaScript runtime. +It also attempts to try and make JavaScript more in line with the trends of many +modern languages. See also [the CoffeeScript website](http://coffeescript.org/), which has a complete tutorial on CoffeeScript. ```coffeescript -# CoffeeScript is a language which compiles to JavaScript. -# It attempts to try and make JavaScript more in line with the trends of many -# modern languages. # Comments are similar to Ruby and Python, using the hash symbol `#` ### -- cgit v1.2.3