Function throwRangeError

The function throwRangeError throws a RangeError with a custom message if called.

  • Parameters

    • Optionalmessage: string = 'The value is off-limits.'

      The message parameter is a string that represents the error message to be displayed when a RangeError is thrown. If no message is provided, the default message is 'The value is off-limits.'.

    Returns void