array iterator with for instead of for in