var arr=[1,2,3,4,5]
// for(var i=0;i<arr.length;i++){
// console.log(arr[i])
// }
var car={
brand:'Benz',
color:'red',
displament:'3.0',
name:'geyao'
}
for(var key in car){
console.log(key+'+'+car[key])
}
for(var key in arr){
console.log(arr[key])
}
运行结果