Get the length of a multidimensional array - Javascript Array

Javascript examples for Array:length Property

Description

Get the length of a 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(){/*from w ww .java 2s  . com*/
var arr=['myValue'];
arr['myValue']=['ProductNR'];
arr['myValue']['ProductNR']=[1,2,3];
console.log(arr['myValue']['ProductNR'].length);
    }

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

Related Tutorials