News for hackers. Stuff that matters.
Re:JS 2 CoffeeScript Compiler by fooyc on Wednesday September 14, 2011 @03:40PM (#2997564)
An other good example is constructors; say you have a function like this:

    function MyClass(x){
        this.x = x;
    }
In Coffeescript this translates to

    MyClass = (x) ->
        @x = x
`x` is returned; and if you return something from a constructor, something is returned instead of the constructed object (`new MyClass({})` returns `{}`).

There are no comments on this comment yet.