js中for in输出数组中属性名跟属性值

js中for in输出数组中属性名和属性值htmlheadscriptvar person {name:suesunna,age:22,love:co

js中for in输出数组中属性名和属性值

<html><head><script>var person = {name:"suesunna",age:22,love:"coding"};for(var i in person){document.write("this person's "+i+" is "+person[i] +"<br/>");}</script></head><body></body></html>

1楼fhqcc07014天前 13:47
这么简单的东东也发表,初学者