Check out example codes for "iterate over a range in c++". It will help you in understanding the concepts better.

Code Example 1

for (int i=0; i<5; ++i) {
  cout << i << " ";
}
// output is 0 1 2 3 4; note 5 is excluded since < is used and not <=

Learn ReactJs, React Native from akashmittal.com