SOLID Principles in JavaScript
What is the main issue with this code according to the Liskov Substitution Principle?
class Bird {
fly() {
console.log('Flying...');
}
}
class Penguin extends Bird {
fly() {
throw new Error('Penguins cannot fly!');
}
}