Skip to content

Instantly share code, notes, and snippets.

@latentflip
Created March 23, 2012 12:11
Show Gist options
  • Save latentflip/2170114 to your computer and use it in GitHub Desktop.
Save latentflip/2170114 to your computer and use it in GitHub Desktop.
CoffeeScript sytax

If we try and use parens only for precedence, not arg passing:

$('#contact_form').submit -> validate this

becomes

($ '#contact_form').submit -> validate this

which almost makes sense

So what does $('tr').find('td').fadeOut(300) become?

(($ 'tr').find 'td').fadeOut 300

is that really better than:

$('tr').find('td').fadeOut 300
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment