var defs=new Array();
defs[somethingA]=somethingB;
for(somethingA in defs){
var somethingB=defs[somethingA];
........
}