How can you achieve class-based inheritance in JavaScript?
- JavaScript uses prototype-based inheritance, but ES6 introduced class syntax to simulate class-based inheritance.
- You can create classes using the
classkeyword and use theextendskeyword for inheritance.