new ReferenceError('x is not defined').message // β 'x is not defined'You can create a ReferenceError manually to signal missing variable access.
ReferenceError extends the built-in Error class.
Challenge: Verify that a ReferenceError is also an instance of Error.