News for hackers. Stuff that matters.
Re:CoffeeScript 1.7.0 by rayshan on Tuesday January 28, 2014 @04:45PM (#7139974)
Instead of this: $ 'body' .click (e) -> $ '.box' .fadeIn 'fast' .addClass '.active' .css 'marginRight', '10px'

You used to have to do this: $('body') .click (e) -> $('.box') .fadeIn('fast') .addClass('.active') .css 'marginRight', '10px'

Note the extra ( )s, if not used, the next method call is not recognized as a method call but rather part of the previous call's argument. The last method call did not and does not need to be closed with ( ).

This is hugely important for libraries like d3 with super long call chains.

There are no comments on this comment yet.