second operator: grid [0] .length is an integer. The second statement in the for loop is a condition statement and must be logical.
If you are trying to execute a loop while col is less than the length of the grid [0], you need this as a second statement:
col <grids [0] .length;
source
share