Check out example codes for "for loop with 2 variables in c++". 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
}

Learn ReactJs, React Native from akashmittal.com