var v1:Array = ["a", "b", "c", "d"];for(var i:String in v1) { trace(i+"|"+v1[i]); //0|a}for each (var propertyValue:String in v1) { trace(propertyValue); //a}/*id|1age|19name|lisi*/var v2:Object = {id:1, name:'lisi', age:19}; //for var i 是map中的key-value的key,而arr[i]指的是value,for(var i in v2) { trace(i+"|"+v2[i]); //经测试,输出顺序无规律}for each (var propertyValue in v2) { //for each是取出value。 trace(propertyValue); // 1 19 lisi}trace(v2["name"]); //lisi