3 ms·
It would have been nice if their code example for this feature showed how the code would have looked in the prior version of Coffeescript.
by bobbyi_settv 13y ago
It would have been nice if their code example for this feature showed how the code would have looked in the prior version of Coffeescript.
- ndnichols 13y agoIt would look like result = range(1, 3).concat(range 4, 6).map((x) -> x * x).filter (x) -> x % 2 is 0 or result = range 1, 3 result = result.concat range 4, 6 result = result.map (x) -> x * x result = result.filter (x) -> x % 2 is 0
- xixixao 13y ago$('body') .click (e) -> $('.box') .fadeIn('fast') .addClass '.active' .css 'background', 'white' If I omit as many parentheses as possible. Also for the other example: result = range(1, 3) .concat(range 4, 6) .map((x) -> x * x) .filter (x) -> x % 2 is 0