All challenges
Multiple ChoiceIntermediate 30s

Composition over Inheritance

Choose the best answer for: composition preference
Options
  1. 1Inheritance is always a better choice than composition in JS
  2. 2Compose objects from smaller parts instead of deep inheritance chains
  3. 3Composition requires classes and cannot use plain objects
  4. 4Composition is slower than inheritance and should be avoided

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle