我一直在读关于Go4的"构建器模式".你可以在这里阅读更多关于这种模式的信息:https://www.sohamkamani.com/javascript/builder-pattern/
我不明白为什么我们不能像这样在单个参数对象中传递多个参数
constructor({ name, age, address, phoneNum, email }) {
this.name = name;
this.age = age;
this. address = address;
this.phoneNum = phoneNum;
this.email = email;
}
在我看来,这比创建构建器类容易得多.
我是不是遗漏了什么?