w3schools
  
HOME HTML CSS XML JAVASCRIPT ASP PHP SQL MORE...   References Examples Forum About
BEST WEB HOSTING JustHosts

JavaScript constructor Property


Array Object Reference JavaScript Array Object

Definition and Usage

The constructor property returns the function that created the array object's prototype.

Syntax

array.constructor


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The constructor property is supported in all major browsers.


Example

Example

Return the function that created the Array object's prototype:

<script type="text/javascript">

var fruits = ["Banana", "Orange", "Apple", "Mango"];
document.write(fruits.constructor);

</script>

The output of the code above will be:

function Array() { [native code] }

Try it yourself »


Array Object Reference JavaScript Array Object

DreamTemplate

WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Top 10 Web Hosting
UK Reseller Hosting
Web Hosting
FREE Web Hosting
Top Web Hosting
Cheap Web Hosting
WEB BUILDING
XML Editor – Free Trial!
FREE Flash Website
FREE Web Templates
EDUCATION
US Web Design Schools
HTML Certification
JavaScript Certification
XML Certification
PHP Certification
ASP Certification
STATISTICS
Browser Statistics
Browser OS
Browser Display
FLIGHT TICKETS
Find the cheapest flight
to any destination now!
SHARE THIS PAGE