JS Built-ins
Errorintermediate

Error types β€” TypeError thrown on null property access

πŸ“– Usage Example
new URIError('malformed URI')
new EvalError('eval() misuse')

URIError and EvalError are rarely encountered but are standard Error subtypes.

TypeError on null access

Accessing a property on null throws a TypeError at runtime.

Challenge: Verify the error is thrown.

πŸ’‘ Hints (1)
  • β€’ Wrap the property access in an arrow function for toThrow().