var a={ name:'xiongwei', age:26, say:function(){ alert(1) } } Object.keys(a).forEach((i)=>console.log(i,a[i]))