CoffeeScript, When to use fat arrow (=>) over arrow (->) and vice versa
No, that’s not the rule I would use. The major use-case I’ve found for the fat-arrow in defining methods is when you want to use a method as a callback and that method references instance fields: class A constructor: (@msg) -> thin: -> alert @msg fat: => alert @msg x = new A(“yo”) x.thin() #alerts … Read more