Yes, but your syntax is unconventional and hence bad(tm)
Hopefully your language supports something like
while(condition) //condition being a statecondition which if true you want to continue looping { do thing; //your conditionally executed code goes here i++; //you can use a counter if you want to reference array items in order of index }