JS Built-ins
Errorbeginner

Error() β€” instanceof Error

πŸ“– Usage Example
const err = new Error('oops')
err instanceof Error  // β†’ true

Error instances can be checked with instanceof to distinguish error types.

Error instanceof

new Error('msg') instanceof Error is true.

Challenge: Verify the instanceof check.

πŸ’‘ Hints (1)
  • β€’ Error instances pass the instanceof Error check.