extends vs super()
extends and super() are both JavaScript Class APIs, and choosing between them is a common point of confusion. This page compares their syntax, parameters, return values, and typical use cases so you can pick the right one. extends: Inherits from another class. Its syntax is class Child extends Parent. super(): Calls parent constructor. Its syntax is super(args). Example of extends: class Dog extends Animal { }. Example of super(): class Child extends Parent { constructor(x) { super(x) } }. Read the full references for extends and super() to see edge cases, time complexity, browser support, and the mistakes developers most often make with each. Other Class APIs worth comparing: class, constructor(), static, new.target. Both belong to the Class category in the JS Reference documentation, which covers 6 entries in total. Try both in the JavaScript playground to see the behavioral difference live.