Iterates an array