Copyright © tutorialspoint.com

Javascript Boolean constructor() Method

previous next

Advertisements


Description:

Javascript boolean constructor() method returns a reference to the Boolean function that created the instance's prototype.

Syntax:

boolean.constructor()

Here is the detail of parameters:

Return Value:

Returns the function that created this object's instance.

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 following result:

bool.constructor() is : function Boolean() { [native code] }

To understand it in better way you can Try it yourself.


previous next

Copyright © tutorialspoint.com