OOP, Prototypal Inheritance, SOLID cross interview #4
- How do you define a
constructor in JavaScript?
- How do you initialize object properties using a
constructor?
- What is the difference between
public and private members in a class?
- How do you declare a
public member in a JavaScript class?
- How do you declare a
private member in a JavaScript class?
- What is a
static member in a class?
- Can
static members be accessed from an instance of a class?
- What is encapsulation in OOP?
- What is the difference between a
method and a property in a class?
- How do you create
getter and setter methods in a class?
- What is the role of the
this keyword in class methods?
- How do you inherit
properties and methods from another class?
- What is
prototypal inheritance in JavaScript?
- How do you set the
prototype of an object?
- What is the
proto property?
- How does
Object.create() work?
- What is a
temporary constructor pattern?
- How does the
instanceof operator work?
- What are the differences between
classical and prototypal inheritance?
- How do you extend a class using the
extends keyword?
- What is the
super keyword used for in ES2015 classes?
- Can you call a parent class’s method from a subclass? How?
- How do you implement inheritance using function constructors?
- How do you implement inheritance using ES2015 classes?
- What does the SOLID acronym stand for?
- What is the Single Responsibility Principle?
- How does the Open/Closed Principle apply to classes?
- What is the Liskov Substitution Principle?
- How does the Interface Segregation Principle improve code design?
- What is the Dependency Inversion Principle?