reduce 4d array to 1d javascript sums code example Example: 2d array java char[][] array = new int[rows][columns];