What will be the result of the following code?
class Fruit {
constructor(type) {
this.type = type;
}
}
class Apple extends Fruit {
constructor() {
super('Apple');
}
}
const fruit = new Apple();
console.log(fruit.type);
What will be the result of the following code?
class Fruit {
constructor(type) {
this.type = type;
}
}
class Apple extends Fruit {
constructor() {
super('Apple');
}
}
const fruit = new Apple();
console.log(fruit.type);