T H E W A L K

Systems Architect, Engineering, Narrative.

Back to main

Code As3 Forin

var arr:Array = ["test", "test2", "test3"];
			
// Use a regular for in loop to access the properties in arr
for ( var i in arr ) {
 	trace( i );	
}
			
// Use the new for each in loop to access the values in arr
for each ( var s:String in arr ) {
 	trace( s );	
}
Back to main