JS Built-ins
RangeErrorbeginner

RangeError β€” instanceof check

πŸ“– Usage Example
new Array(-1)  // throws RangeError: Invalid array length

RangeError is thrown when a value is not within the allowed range.

RangeError Constructor

new RangeError('out of range') creates a RangeError instance.

Challenge: Verify that a new RangeError is an instance of RangeError.

πŸ’‘ Hints (1)
  • β€’ Use new RangeError(message) to create a RangeError instance.