class Animal { speak() { return 'generic sound'; } }
class Cat extends Animal { speak() { return 'meow'; } }
new Cat().speak(); // 'meow'Override a parent method in the child class to change its behavior.
A subclass can override (redefine) methods from the parent class. When you call the method on a subclass instance, the subclass version is used instead of the parent's.
Challenge: Create a subclass that overrides a parent method with different behavior.