Check out example codes for "bash for loop one line". It will help you in understanding the concepts better.

Code Example 1

for [[ CONDITION_STATEMENT ]]; do SOME_CODE; done

Code Example 2

while true; do foo; sleep 2; done

Learn ReactJs, React Native from akashmittal.com