Check out example codes for "C++ while". It will help you in understanding the concepts better.

Code Example 1

while (condition) {

      // code block to be executed

 }

Code Example 2

while (x){ ... }

Learn ReactJs, React Native from akashmittal.com