class Mimic {
/**
* Constructor for the Mimic class.
*
* @param {string} name - Name of the team member associated with the mimic.
* @param {string} skill - Unique skill reflected in the mimic.
*/
constructor(name, skill) {
this.name = name;
this.skill = skill;
}
/**
* Method to display information about the mimic.
*
* @returns {string} Information about the mimic.
*/
displayMimicInfo() {
return `${this.name}'s mimic reflects ${this.skill}.`;
}
}
// Creating mimics for each team member
const quokkaMimic = new Mimic('Sacha', 'leadership (Quokka)');
const duckMimic = new Mimic('Aya', 'instincts (Duck)');
const butterflyMimic = new Mimic('Elina', 'scouting (Butterfly)');
const rabbitMimic = new Mimic('Sachia', 'reconnaissance (Rabbit)');
const lionMimic = new Mimic('Dion', 'courage (Lion)');
const crocodileMimic = new Mimic('Iori', 'loyalty (Crocodile)');
const bearMimic = new Mimic('Mikhayla', 'strength (Bear)');
// Displaying information about each mimic
console.log(quokkaMimic.displayMimicInfo());
console.log(duckMimic.displayMimicInfo());
console.log(butterflyMimic.displayMimicInfo());
console.log(rabbitMimic.displayMimicInfo());
console.log(lionMimic.displayMimicInfo());
console.log(crocodileMimic.displayMimicInfo());
console.log(bearMimic.displayMimicInfo());
Editor is loading...