'constructor' Example : constructor « Javascript Properties « JavaScript Reference

'constructor' Example

    
<html>
<body>
<script language="javascript">
function function1(){
    var array = new Array('1', '2');
    alert(array.constructor); 
} 
</script>
<button onclick="function1();">Array Constructor</button>
</body>
</html>

    
      
      








Related examples in the same category

1.'constructor' Syntax and Note
2.'constructor' is applied to