简单教程
提交运行
代码编辑器:
<script> function myFunction(){ var x; var txt=""; var person={fname:"Bill",lname:"Gates",age:56}; for (x in person){ txt=txt + " " + person[x]; } document.write(txt); } myFunction(); </script>
运行结果: