function Person(name = 'people') { if (typeof Person.instance === 'object') { return Person.instance; } console.log('init Person...') this.name = name; Person.instance = this; } var person1 = new Person(); var person2 = new Person(); console.log(person1 === person2)