nextRows = nextRows.substring(0, nextRows.length - 1);
Uncaught TypeError: currentRows.push is not a function