Created
August 13, 2013 10:30
-
-
Save geraudmathe/6219926 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# COFFEE | |
@func | |
# JS | |
this.func | |
# COFFEE | |
@func() | |
# JS | |
this.func() | |
# COFFEE | |
@func | |
param1: "string" | |
# JS | |
this.func({ | |
param1: "string" | |
}) | |
#coffee | |
my_hash = | |
param1: "value1" | |
param2: "value2" | |
#javascript | |
my_hash = { | |
param1: "value1", | |
param2: "value2" | |
} | |
#coffee | |
a_function_name = -> | |
alert "something" | |
#JS | |
a_function_name = function(){ | |
alert("something"); | |
} | |
#coffee | |
a_function_name = -> | |
alert "something" | |
#JS | |
a_function_name = function(){ | |
} | |
alert("something"); | |
#coffee | |
a_function_name -> | |
alert "something" | |
#JS | |
a_function_name(function(){ | |
}) | |
alert("something"); | |
#coffee | |
a_value = "booh" | |
"something #{a_value}" | |
#js | |
var a_value = "booh"; | |
"something"+ a_value; | |
#coffee | |
a_func = -> | |
@ | |
another_func => | |
@func() | |
this | |
#js | |
a_func = function(){ | |
_this = this; | |
another_func(function(){ | |
_this.func() | |
this.func() | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment