Menu
×
×
正确
class Person {
@(7) name: string;
public constructor(name: string) {
this.name = name;
}
@(6) getName(): string {
return this.name;
}
}
class Person {
private name: string;
public constructor(name: string) {
this.name = name;
}
public getName(): string {
return this.name;
}
}
不正确
点击 此处 重试 正确
下一题 ❯class Person {w3exercise_input_no_0name: string; public constructor(name: string) { this.name = name; }w3exercise_input_no_1getName(): string { return this.name; } } |