###Keyword###
For...In...Next

###Description###
Enumerates elements in an Object collection or an Array

###Syntax###
<b>For</b> &lt;$Variable&gt; <b>In</b> &lt;expression&gt;
	<i>statements</i>
	...
<b>Next</b>


###Parameters###
@@ParamTable@@
Variable
	A variable to which an element is being assigned
expression
	Must be an expression resulting in an Object, or an Array with at least one element
@@End@@

###Remarks###
The Variable will be created automatically with a Local scope, even when <a href="../functions/AutoItSetOption.htm#MustDeclareVars">MustDeclareVars</a> is on.
If the expression is an Object collection with no elements, or an multi-dimensional array, the loop will be skipped and the Variable will contain an empty string.
If the expression is not an Object nor an Array, the script stops with an error, unless a COM Error handler had been configured.
AutoIt Arrays are read-only when using For...In. While you can assign the variable inside the For...In loop a value, this change is not reflected in the array itself. To modify the contents of an array during enumeration, use a For...To loop.

For...In...Next statements may be nested.


###Related###
<a href="With.htm">With...EndWith</a>


###Example###
@@IncludeExample@@
