This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Person(firstName, lastName, age, ssn) { | |
// Declaring this way by default will make your property | |
// readable, writable, and enumerable | |
this.firstName = firstName; | |
this.lastName = lastName; | |
// Let's make a getter-only method that returns the | |
// two values as a whole name | |
Object.defineProperty(this, 'fullName', { | |
get: function() { |