var o = {x:7,y:8,z:9}; var a = [],i = 0; for(a[i++] in o){ document.write("a:" + a); }