ES6-函数中new.target 方法 // 1. ECMAScript 5 中判断构造函数是否通过 new 关键字调用的写法 function Person (fullName) { if (this instanceof Person) { this.fullName = fullName; } else { return new Person(fullName); } } let student = Person(