JavaScript Error name
JavaScript Error name
The name property is used to either set or return the name of an error.
Syntax:-
Its syntax is:- errorObj.name
Return:-
Its return is:- name of error
Further Explanation:-
There is a total of six different values that can be returned by error property. These are:-
Error Name | Description |
---|---|
EvalError | Error at execution. |
RangeError | A number out of range has occurred |
ReferenceError | An illegal reference has occurred |
SyntaxError | A syntax error has occurred |
TypeError | A type error has occurred |
URIError | An error in encodeURI() has occurred |