Javascript examples for Array:constructor
In JavaScript, the constructor property returns the constructor function for an object.
function Array() { [native code] }
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {// www .j a v a2 s. co m var fruits = ["Banana", "Orange", "Apple", "Mango"]; document.getElementById("demo").innerHTML = fruits.constructor; } </script> </body> </html>