Create in multidimensional array - Javascript Array Operation

Javascript examples for Array Operation:Associative Array

Description

Create in multidimensional array

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=function(){/*  w w  w  .  j  ava2s. c o m*/

var a = [],
    john = { username: 'john', age: 30, sex: 'M' };
a.push(john);
console.log(a);


    }

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials