Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumJavaScriptError subclassingSingle-choice MCQ

An Error subclass is created with class extends. Which line is required for instanceof to reliably report the correct subclass when the code is transpiled down to ES5?

class AppError extends Error { constructor(message) { super(message); // ??? this.name = 'AppError'; } }