Question · JavaScript and TypeScript course · Module 3: Classes and OOP

Multiple Inheritance in JavaScript

Why doesn't JavaScript support multiple inheritance (extending from multiple classes)?

Answer options

  • Because the V8 engine is not efficient enough
  • To avoid problems like the diamond problem when two base classes have the same method
  • Because classes in JavaScript don't support methods
  • Multiple inheritance works, but only in TypeScript

You can check the correct answer by solving this task in the CodeWorlds game.