'constructor' Example : constructor « Object Oriented « JavaScript DHTML






'constructor' Example

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

    
      
      








Related examples in the same category