class syntax import EmberObject, { computed } from '@ember/object'; const Person = EmberObject.extend({ firstName: 'Steve', lastName: 'Rogers', fullName: computed('firstName', 'lastName', function() { return `${this.firstName} ${this.lastName}`; }), updateName(firstName, lastName) { this.set('firstName', firstName); this.set('lastName', lastName); }, }); // Make an instance of the class, overriding default values Person.create({ firstName: 'Jean', lastName: 'Gray' }); // A person class defined with the new class syntax import EmberObject, { computed } from '@ember/object'; class Person extends EmberObject { firstName = 'Steve'; lastName = 'Rogers'; @computed('firstName', 'lastName') get fullName() { return `${this.firstName} ${this.lastName}`; } updateName(firstName, lastName) { this.set('firstName', firstName); this.set('lastName', lastName); } } // Make an instance of the class, overriding default values Person.create({ firstName: 'Jean', lastName: 'Gray' });