Removing multiple arrays from a 2D array - Javascript jQuery

Javascript examples for jQuery:Array

Description

Removing multiple arrays from a 2D 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" src="https://code.jquery.com/jquery-1.11.0.js"></script> 
  <script type="text/javascript">
    $(window).load(function(){//from  w w  w .j  a v  a 2s  . c o m
var multiArray = [["","","",""],[1,2,3,4,5,6,7],["hello","dog","cat"],["","","",""]];
    multiArray = $.grep(multiArray, function(v){
        return v.join('');
    })
console.log(multiArray)
    });

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

Related Tutorials