JS Built-ins
Errorbeginner

Error() β€” typeof is object

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

The name property identifies the error type; it defaults to 'Error'.

typeof Error Instance

An error object is an object β€” typeof new Error('x') is 'object'.

Challenge: Verify the type.

πŸ’‘ Hints (1)
  • β€’ Error instances are objects.