as3 dictionary种使用不同for循环迭代不同内容

as3 dictionary类使用不同for循环迭代不同内容
import flash.utils.Dictionary;

var a:Object = new Object();
var b:Object = new Object();

var dict:Dictionary = new Dictionary();
dict[a] = 1; // dict[a] = 1;
dict[b] = 2; // dict[b] = 2;

for (var prop:* in dict) {
      trace(prop); // traces: [object Object], [object Object]
      trace(dict[prop]); // traces: 1, 2
}

for each(var prop:* in dict) {
      trace(prop); // traces: 1 ,2
     }

for 迭代的是每个key
for each 迭代出每个value