Is there a way to output two instances of the class Cat : Skitty, 9 years and Pixel, 6 years, in the console?
(() => {
class Cat {
constructor(name, age) {
this.name = name;
this.age = age;
}
}
document.getElementById("run").addEventListener("click",() => {
// your code here
})
})();
Thank you in advance for your help, I'm still learning!