// ____ _ _
// / ___| __ _ _ __ (_) | |
// \___ \ / _` | '_ \| | | |
// ___) | (_| | | | | | | |
// |____/ \__,_|_| |_|_| |_|
// | _ \ ___ ___ ___ _ __ ___ __ _ _ __ _ _
// | | | |/ _ \/ __|/ _ \ '_ ` _ \ / _` | '__| | | |
// | |_| | __/\__ \ __/ | | | | | (_| | | | |_| |
// |____/ \___||___/\___|_| |_| |_|\__,_|_| \__,_|
class Person {
name: string;
role: string;
skills: string[];
constructor(name: string, role: string, skills: string[]) {
this.name = name;
this.role = role;
this.skills = skills;
}
introduce(): string {
return "Hi, I'm ${this.name}, a ${this.role}.";
}
hasSkill(skill: string): boolean {
return this.skills.includes(skill);
}
topSkills(count: number = 3): string[] {
return this.skills.slice(0, count);
}
}
const me = new Person("Sanil Desemaru", "Full‑Stack Developer", ["React", "Next.js", "TypeScript", "Node.js", "Web3"]);
me.introduce(); // -> "Hi, I'm Sanil Desemaru, a Full‑Stack Developer."