Pages

Javascript Number - constructor()

Description:

This method returns a reference to the Number function that created the instance's prototype.

Syntax:

number.constructor()

Here is the detail of parameters:
  • NA

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 num = new Number( 177.1234 );
   document.write("num.constructor() is : " + num.constructor); 
</script>
</body>
</html>

This will produce following result:

num.constructor() is : function Number() { [native code] }
 
+JavaScript Frameworks Links +Javascript Development  +JavascriptU 
  +Javascript Problems   +javaScript is a creek in West Virginia in the summer 
 
 

No comments:

Flag Counter
| Copyright © 2013 Remote Tutor