/ Published in: ActionScript 3
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
var obj:Object = {age:19, name:"Martijn" ,country:"Belgium",location:"Lommel",zipCode:3920};
traceObject(obj);
private function traceObject(o:Object):void{
trace('\n');
for(var val:* in o){
trace(' [' + typeof(o[val]) + '] ' + val + ' => ' + o[val]);
}
}
// trace output
///////////////////////////
// [string] name => Martijn
// [string] location => Lommel
// [string] country => Belgium
// [number] zipCode => 3920
// [number] age => 19
///////////////////////////
Comments
 Subscribe to comments
                    Subscribe to comments
                
                