Copyright © tutorialspoint.com
Javascript array constructor property returns a reference to the array function that created the instance's prototype.
array.constructor |
Here is the detail of parameters:
NA
Returns the function that created this object's instance.
<html>
<head>
<title>JavaScript Array constructor Property</title>
</head>
<body>
<script type="text/javascript">
var arr = new Array( 10, 20, 30 );
document.write("arr.constructor is:" + arr.constructor);
</script>
</body>
</html>
|
This will produce following result:
arr.constructor is: function Array() { [native code] }
|
To understand it in better way you can Try it yourself.
Copyright © tutorialspoint.com