ES6 Classes & Constructors
What design pattern is being implemented here?
class Vehicle {
constructor() {
if (new.target === Vehicle) {
throw new Error('Cannot instantiate abstract class');
}
}
drive() {
throw new Error('Method must be implemented');
}
}