Question #209

Author: admin
tags: JavaScript  
class Animal {
  #legsAmount = 10;
}

class Cat extends Animal {
  getLegsAmount() {
    return this.#legsAmount;
  }
}

const myPet = new Cat();
console.log(myPet.getLegsAmount());
What will be printed?
10
undefined
SyntaxError
Private class fields are not accessible from the derived classes.
Rate the difficulty of the question:
easyhard