What will the following code print?
class Animal {
constructor() {
this.type = 'Animal';
}
}
const cat = new Animal();
console.log(cat.type);
What will the following code print?
class Animal {
constructor() {
this.type = 'Animal';
}
}
const cat = new Animal();
console.log(cat.type);