constructor
Error
instance property
JS Home <<
JS Reference <<
Error <<
constructor
Description
Returns a reference to the function that created the prototype.
Syntax
Signature | Description |
---|---|
anError.constructor | Returns a reference to the function that created the prototype. |
Parameters
None.
Examples
The code below displays the prototype function of Error
.
var anError = new Error();
alert('Error constructor is ' + anError.constructor);
Related Tutorials
JavaScript Advanced Tutorials - Lesson 2 - Errors