javascript filter nested array code example
Example 1: js reverse nested array
var reversed = array.map(function reverse(item) {
return Array.isArray(item) && Array.isArray(item[0])
? item.map(reverse)
: item.reverse();
});
Example 2: javascript nested array
//2-dimensional(nested) array
var array = [[0,2,3,7,2,2,1],[1,2,6,3,7,0,3]]