FlashPlaya

March 25, 2009

for, for in, for each in

Filed under: AS 3 — Tags: , , — iBen @ 2:42 am

An interesting difference between each of them is quite unique.

for is a simple iterator

for in, is an iterator in which what the declared var will be within the object you are testing against, will be a property.

for each in, is an iterator in which what the declared var will be within the object you are testing against will be the stored value of that property of the object.

Powered by WordPress