For loops with multiple conditions?

Hi!

I was wondering, is it possible to do a for loop, and tell it to do something like this:

for(var i:int=0;i<pathList.Count;Vector3.Distance(pathList*.RLPos, transform.position)<10;i++)*

Where this should only add 1 to “i” when it is lower then pathList’s length, and the distance between my position and a different position is less then 10.
This code won’t work, but I can’t believe there isn’t a way to do this even tho I can’t find one myself.
Cheers!
~Nick
EDIT: This did the trick:
for(var i:int=0;i<pathList.Count && Vector3.Distance(pathList*.RLPos, transform.position)<10;i++)*
As answered by Julien.

To use multiple tests in any conditional (e.g. a for loop, if statement), you need to use ‘&&’:

if (this is true && that is true)