The value of the foreach expression is the value of the last expression list that was evaluated, or zero (0), if the loop was never entered.The in condition, which is executed only once (after the loop variable has been declared) controls the iteration of the loop. Before each iteration, the loop variable is assigned successive values from the argument list. The argument list cannot be empty.
foreach variable in( argument list )do
Note: Use a comma (,) to separate more than one simple expression in the argument list. The value of the last expression list that was evaluated, or zero(0), if the loop was never entered.