Employee = { New: function(fname,lname,em) { return { first: fname, last: lname, email: em, displayName: function() { return this.last + ', ' + this.first }, sig: function() { return this.displayName() + ' ' + this.email } } } } var tim = Employee.New('Tim', 'Hoolihan','tim@hoolihan.net') tim.sig()
Javascript Objects and Hashes
by
Tags: