Javascript array constructor property returns a reference to the array function that created the instance's prototype.
Its syntax is as follows −
array.constructor
Returns the function that created this object's instance.
Try the following example.
<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>
arr.constructor is: function Array() { [native code] }