Please assess my attempt for the relevant JavaScript OOP questions. I did have issues with the third question, setting the name to square and sides to 4 automatically. Feedback is appreciated on best practices to do so. (sub-class question 3)
code: https://codepen.io/KyleMorley/pen/VwbbWWe?editors=0012
task page: https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Test_your_skills:_Object-oriented_JavaScript
Thank you
Hello @Kyle_Morley
you doing well but there some issue related to the inheritance
if class B inheritance from class A then B has all field and method that class A has so you do not need to has to define those field again and for method you still can use the method of the parent (class A) without any modification but if you want to change it behavior you can by override it in your child class (class B)
so the constructor of Shape should only get the sideLength case the other field already known
constructor(name, sides, sidesLength) { this should be constructor(sidesLength)
super(name, sides, sidesLength); we already know the name and sides so it should be super("Square", 4, sidesLength);
this.name = name; // we do not need that case this already defined in the shape class
this.sides = sides; // we do not need that case this already defined in the shape class
this.sidesLength = sidesLength; // we do not need that case this already defined in the shape class
};
hope that help and have a nice day 
Fixed. Thanks for the feedback