15 lines
269 B
TypeScript
15 lines
269 B
TypeScript
class Identity {
|
|
private title: string;
|
|
private name: string;
|
|
|
|
public constructor(title: string, name: string) {
|
|
this.title = title;
|
|
this.name = name;
|
|
}
|
|
|
|
public introduce(): void {
|
|
show(`Hi! My name is ${this.name} and i'm the ${this.title} here.`);
|
|
}
|
|
}
|
|
|