The JavaScript Boolean.constructor() method returns a reference to the prototype Boolean function that created the instance.
Grammar
boolean.constructor()
Return value:
Here are the details of the parameters:
Returns the instance that created this object.
Example:
<html> <head> <title>JavaScript constructor() Method</title> </head> <body> <script type="text/javascript"> var bool = new Boolean( ); document.write("bool.constructor() is:"+bool.constructor); </script> </body> </html>
This will produce the following results:
bool.constructor() is : function Boolean() { [native code] }