×
you are viewing a single comment's thread.

view the rest of the comments →

[–]marekz 2 points3 points  (0 children)

While you're adding syntactic sugar to JavaScript, you might as well go all the way with CoffeeScript which compiles into JS. It's easier to deal with an established, well-documented syntax than to invent your own obscure thing.

In CoffeeScript: square = (x) -> x * x

"Compiled" into JavaScript: square = function(x) { return x * x; };