Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to remove sub array null index in javascript

var array = [ [ 1, , 2 ], [ 3, , 4 ], [ 5, , 6 ] ];

var filtered = array.filter(function (el) {
  return el != null;
});

console.log(filtered);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #array #null #index #javascript
ADD COMMENT
Topic
Name
4+2 =