namebeginnerclass AppError extends Error {
constructor(msg) { super(msg); this.name = 'AppError' }
}
new AppError('x').name // β 'AppError'Set this.name in subclass constructors to give custom errors a meaningful name.
new SyntaxError().name returns 'SyntaxError'.
Challenge: Verify the name.