Try dividing all the values in the image above by 3. You’ll see some interesting
patterns. Every value in the first row (0, 1, and 2) yield zero (and some
remainder) when divided by 3. Each element in the second row (3, 4, and 5)
gives 1 remainder something, and each element of the third row produces a
2 remainder something. If you divide any of these numbers by 3 and convert
the result into an integer, you’ll get the row number. In JavaScript, you can
use this line of code: