以下是MDN的代码段:
class Person {
constructor(first, last, age, gender, interests) {
this.name = { //I don't understand these lines
first, //I don't understand these lines
last //I don't understand these lines
};
this.age = age;
this.gender = gender;
this.interests = interests;
}
我理解这一点:
this.name = {
first: first,
last: last
}
但不是第一个。有人可以对我解释一下吗?