Check out example codes for "c++ for loop multiple variables". It will help you in understanding the concepts better.

Code Example 1

for (int x=0, y=0 ; x < 10 && y < 10 ; x++, y++)
{
    // Your code here
}

Code Example 2

// Need to initialize both x and y individually
for(int x=0, y=0; x + y < z; x++, y++) { /* code */ }

Learn ReactJs, React Native from akashmittal.com