Skip to content

Instantly share code, notes, and snippets.

@dsimard
Created May 9, 2012 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsimard/2645929 to your computer and use it in GitHub Desktop.
Save dsimard/2645929 to your computer and use it in GitHub Desktop.
Why I love coffeescript
["The value of", property, "is", value].join(" ")
doSomething ->
if true
alert ';)'
# OR #
alert ';)' if true
if (true) {
alert(';)');
}
"The value of #{property} is #{value}"
doSomething(function() {
})
if (nullFct != null && typeof nullFct == "function") {
nullFct();
}
"The value of " + property + " is " + value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment