Created
December 8, 2011 13:43
-
-
Save xitij2000/1447029 to your computer and use it in GitHub Desktop.
JavaScript generated from CoffeeScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var square; | |
square = function(n) { | |
var i, _results; | |
_results = []; | |
for (i = 1; 1 <= n ? i <= n : i >= n; 1 <= n ? i++ : i--) { | |
_results.push(i * i); | |
} | |
return _results; | |
}; | |
document.write(square(10)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment