2d array out array reverse javascript code example
Example: js reverse nested array
var reversed = array.map(function reverse(item) {
return Array.isArray(item) && Array.isArray(item[0])
? item.map(reverse)
: item.reverse();
});