JS Built-ins
Errornamebeginner

Error.name β€” base Error is 'Error'

πŸ“– Usage Example
new Error('x').name  // β†’ 'Error'

The name property of a base Error is 'Error'.

Error.prototype.name

The .name property identifies the type of error. For the base Error class it is 'Error'.

Challenge: Verify new Error().name.

πŸ’‘ Hints (1)
  • β€’ The base Error class has name "Error".