标签:console first second class 输出 结果 copy pre obj
for....in 主要是来遍历对象
var obj={ "1": "first", "two": "zoo", "3": "2", "three": "34", "4": "1", "2": "second" }; for (var i in obj) { console.log(i+":"+obj[i]); };
输出结果:
//1:first //2:second //3:2 //4:1 //two:zoo //three:34
标签:console first second class 输出 结果 copy pre obj
原文地址:https://www.cnblogs.com/wangdashi/p/9431860.html