Inheritance and super
In short: class Child extends Parent makes Child inherit every
method Parent has — an instance of Child is also, genuinely, an
instance of Parent. Inside Child's constructor, super(...) calls
Parent's constructor, and it must run before this is used — a
subclass constructor has no usable this until its parent's part of the
object has been built. Inside a method, super.method() calls the
parent's version of that method specifically, even when the child has
overridden it with its own.

Extend a class and call its parent's method
super(title) builds the parent portion of the object; super.describe()
later calls Song's own describe, and the child's version extends that
result:
s.describe() prints "Song: Blue Hour (live at The Grand)" —
LiveSong's describe calls super.describe() to reuse Song's
formatting, then adds its own venue text. s instanceof Song is true:
an instance of a subclass is also an instance of every class it extends,
all the way up.
The trap: using this before calling super()
In a subclass constructor, this isn't ready until super() has actually
run — reading or writing it any earlier throws immediately:
This throws ReferenceError: Must call super constructor in derived class before accessing 'this' or returning from derived constructor. The fix:
super(title) must be the first statement in a subclass constructor,
before any use of this.
Quick practice
What does class LiveSong extends Song give LiveSong access to?
What does super(title) do inside a subclass's constructor?
What happens if a subclass constructor uses this before calling super()?
Inside an overridden method, what does super.describe() call?
Given const s = new LiveSong(...) where class LiveSong extends Song, what does s instanceof Song return?
🎯 Your turn
Given
class Song { constructor(title) { this.title = title; } } class LiveSong extends Song { constructor(title, venue) { this.venue = venue; super(title); } },
explain exactly why new LiveSong("a", "b") throws an error, and how to
fix the constructor.
Write your explanation and submit it — there's no code to run here, just your reasoning.
