I think the short names aren't anywhere near as bad for readability as using (ri,i) as a table index.

If you're going to use short names at least make it clear which belong together. Especially don't use different lengths when things ought to be similar.

    data.forEach((row,i) => row.forEach((ele,j) => ... ))