let x;
let a = ['a','b','c']
let b = {name:'LIUNAN',age:19}
for(x of a){
document.write(x)
}
for(x in a){
document.writeln(x+':'+a[x])
}
for(x in b){
console.log(x+":"+b[x])
}
</script>
js中for in,of区别
猜你喜欢
转载自www.cnblogs.com/qiyc/p/8922277.html
今日推荐
周排行