Created
February 28, 2012 17:44
-
-
Save guillaumerose/1933911 to your computer and use it in GitHub Desktop.
CoffeeScript + Rhino
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
hello = (name) -> | |
print "Hello #{name} !" | |
hello "Java" |
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
(function() { | |
var hello; | |
hello = function(name) { | |
return print("Hello " + name + " !"); | |
}; | |
hello("Java"); | |
}).call(this); |
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
~/tmp/coffeerhino% coffee -c func.coffee | |
~/tmp/coffeerhino% rhino func.js | |
Hello Java ! | |
~/tmp/coffeerhino% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment