Adding a function call on the end of function in coffeescript
问题 Any ideas on how to write this as coffeescript? Person = Ember.Object.extend({ // these will be supplied by `create` firstName: null, lastName: null, fullName: function() { var firstName = this.get('firstName'); var lastName = this.get('lastName'); return firstName + ' ' + lastName; }.property('firstName', 'lastName') }); I'm particularly interested in the }.property part of the code. I can't figure out how to write this in coffeescript. 回答1: personally, i like braces around my functions: